Minor cleanup

TI compiler detects "multipart" as unused

PUBLISHED_FROM=ababf8965a742418cff610df319e4d8c42e02439
This commit is contained in:
Deomid Ryabkov 2016-03-28 15:10:59 +03:00 committed by rojer
parent d03b96b699
commit 0991ad7cc8
2 changed files with 3412 additions and 4 deletions

View File

@ -5256,7 +5256,6 @@ static void mg_http_multipart_begin(struct mg_connection *nc,
struct mg_str *ct;
struct mbuf *io = &nc->recv_mbuf;
const char multipart[] = "multipart";
char boundary[100];
int boundary_len;
@ -5272,9 +5271,7 @@ static void mg_http_multipart_begin(struct mg_connection *nc,
}
/* Content-type should start with "multipart" */
if (strncmp(ct->p, "multipart", ct->len < sizeof(multipart) - 1
? ct->len
: sizeof(multipart) - 1) != 0) {
if (ct->len < 9 || strncmp(ct->p, "multipart", 9) != 0) {
goto exit_mp;
}

3411
mongoose.h

File diff suppressed because it is too large Load Diff