commit eb5524da37edb7d6046da2363efea6dbc6d8a8c1
parent 0fd07156b15e4e9ecd39fa01c0a2d3177a5fd275
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Sat, 27 Jun 2026 23:04:11 +0200
read_response_file(): improved readability
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/mhd2/stream_process_reply.c b/src/mhd2/stream_process_reply.c
@@ -1116,7 +1116,7 @@ read_response_file (struct MHD_Connection *restrict c,
size_filled))
{
case mhd_FILE_READ_OK:
- break;
+ return true;
case mhd_FILE_READ_ERROR:
mhd_STREAM_ABORT (c, \
mhd_CONN_CLOSE_FILE_READ_ERROR, \
@@ -1135,12 +1135,11 @@ read_response_file (struct MHD_Connection *restrict c,
"than specified by application.");
return false;
default:
- mhd_UNREACHABLE ();
- c->rp.cntn_loc = mhd_REPLY_CNTN_LOC_NOWHERE;
- return false;
+ break;
}
-
- return true;
+ mhd_UNREACHABLE ();
+ c->rp.cntn_loc = mhd_REPLY_CNTN_LOC_NOWHERE;
+ return false;
}