mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
Fix #1444 - clang warns on undefined behavior with null pointers
This commit is contained in:
1 parent
9fd80fd136
commit
c53e2fcc14
3 files changed
+8
-6
No files matched your search
+1
-1
@@ -919,7 +919,7 @@ void mg_http_delete_chunk(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
static void http_cb(struct mg_connection *c, int ev, void *evd, void *fnd) {
|
||||
if (ev == MG_EV_READ || ev == MG_EV_CLOSE) {
|
||||
struct mg_http_message hm;
|
||||
for (;;) {
|
||||
while (c->recv.buf != NULL && c->recv.len > 0) {
|
||||
int n = mg_http_parse((char *) c->recv.buf, c->recv.len, &hm);
|
||||
bool is_chunked = n > 0 && mg_is_chunked(&hm);
|
||||
if (ev == MG_EV_CLOSE) {
|
||||
|
||||
Reference in new issue
Block a user