aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-09-20 14:06:47 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-09-20 14:06:47 +0100
commita7bcf274ccf3dd6eca86c5fbdf2d568690e0c494 (patch)
tree384d31aa3a972955fd35f26d16400cb749c3a809 /lib
parentf3042018686c0e5659264acb9bc20373c4e4503a (diff)
mime: rephrase the multipart output state machine (#1898) ...
... in hope coverity will like it much.
Diffstat (limited to 'lib')
-rw-r--r--lib/mime.c7
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: