1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

mime: rephrase the multipart output state machine (#1898) ...

... in hope coverity will like it much.
This commit is contained in:
Patrick Monnerat 2017-09-20 14:06:47 +01:00
parent f304201868
commit a7bcf274cc

View File

@ -972,11 +972,14 @@ static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
convbuf = buffer; convbuf = buffer;
} }
#endif #endif
mimesetstate(&mime->state, mimesetstate(&mime->state, MIMESTATE_CONTENT, part);
part? MIMESTATE_CONTENT: MIMESTATE_END, part);
} }
break; break;
case MIMESTATE_CONTENT: case MIMESTATE_CONTENT:
if(!part) {
mimesetstate(&mime->state, MIMESTATE_END, NULL);
break;
}
sz = readback_part(part, buffer, nitems); sz = readback_part(part, buffer, nitems);
switch(sz) { switch(sz) {
case CURL_READFUNC_ABORT: case CURL_READFUNC_ABORT: