summaryrefslogtreecommitdiff
path: root/lib/mime.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-04-28 18:07:33 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-04-28 23:11:00 +0200
commit9ce7eee07042605045dcfd02a6f5b38ad5c8a05d (patch)
tree7a83474325c43f8d34233dae5bad509b2475ce74 /lib/mime.c
parent31303c34e90949847860db82c4768cab1482beda (diff)
downloadcurl-9ce7eee07042605045dcfd02a6f5b38ad5c8a05d.tar.gz
checksrc: find bad indentation in conditions without open brace
If the previous line starts with if/while/for AND ends with a closed parenthesis and there's an equal number of open and closed parentheses on that line, verify that this line is indented $indent more steps, if not a cpp line. Also adjust the fall-out from this fix. Closes #11054
Diffstat (limited to 'lib/mime.c')
-rw-r--r--lib/mime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 0b21a1027..39aac8f24 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1107,7 +1107,7 @@ static int mime_subparts_seek(void *instream, curl_off_t offset, int whence)
return CURL_SEEKFUNC_CANTSEEK; /* Only support full rewind. */
if(mime->state.state == MIMESTATE_BEGIN)
- return CURL_SEEKFUNC_OK; /* Already rewound. */
+ return CURL_SEEKFUNC_OK; /* Already rewound. */
for(part = mime->firstpart; part; part = part->nextpart) {
int res = mime_part_rewind(part);
@@ -1734,7 +1734,7 @@ const char *Curl_mime_contenttype(const char *filename)
size_t len2 = strlen(ctts[i].extension);
if(len1 >= len2 && strcasecompare(nameend - len2, ctts[i].extension))
- return ctts[i].type;
+ return ctts[i].type;
}
}
return NULL;