aboutsummaryrefslogtreecommitdiff
path: root/src/tool_formparse.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-05-11 23:40:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-05-21 23:21:47 +0200
commitcb529b713f4882ac65a074ae8d87faa41d19168e (patch)
treeb9f23f33a817107127020630c7b9b5764e8685f0 /src/tool_formparse.c
parentf3d836b73601fc6d14cb917e1cd72f43b9056dff (diff)
checksrc: make sure sizeof() is used *with* parentheses
... and unify the source code to adhere. Closes #2563
Diffstat (limited to 'src/tool_formparse.c')
-rw-r--r--src/tool_formparse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index 5313b3441..9fcf014b8 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -168,12 +168,12 @@ static int read_field_headers(struct OperationConfig *config,
pos++;
if(!incomment) {
- if(hdrlen == sizeof hdrbuf - 1) {
+ if(hdrlen == sizeof(hdrbuf) - 1) {
warnf(config->global, "File %s line %d: header too long (truncated)\n",
filename, lineno);
c = ' ';
}
- if(hdrlen <= sizeof hdrbuf - 1)
+ if(hdrlen <= sizeof(hdrbuf) - 1)
hdrbuf[hdrlen++] = (char) c;
}
}
@@ -451,7 +451,7 @@ static CURLcode file_or_stdin(curl_mimepart *part, const char *file)
if(strcmp(file, "-"))
return curl_mime_filedata(part, file);
- sip = (standard_input *) calloc(1, sizeof *sip);
+ sip = (standard_input *) calloc(1, sizeof(*sip));
if(!sip)
return CURLE_OUT_OF_MEMORY;