diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2017-09-20 14:06:47 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2017-09-20 14:06:47 +0100 |
commit | a7bcf274ccf3dd6eca86c5fbdf2d568690e0c494 (patch) | |
tree | 384d31aa3a972955fd35f26d16400cb749c3a809 | |
parent | f3042018686c0e5659264acb9bc20373c4e4503a (diff) |
mime: rephrase the multipart output state machine (#1898) ...
... in hope coverity will like it much.
-rw-r--r-- | lib/mime.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mime.c b/lib/mime.c index 4eeb8375d..03ccfc200 100644 --- a/lib/mime.c +++ b/lib/mime.c @@ -972,11 +972,14 @@ static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems, convbuf = buffer; } #endif - mimesetstate(&mime->state, - part? MIMESTATE_CONTENT: MIMESTATE_END, part); + mimesetstate(&mime->state, MIMESTATE_CONTENT, part); } break; case MIMESTATE_CONTENT: + if(!part) { + mimesetstate(&mime->state, MIMESTATE_END, NULL); + break; + } sz = readback_part(part, buffer, nitems); switch(sz) { case CURL_READFUNC_ABORT: |