summaryrefslogtreecommitdiff
path: root/tests/server/getpart.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-12-14 01:29:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-12-14 01:29:44 +0100
commit1c3e8bbfedcd3822aeb1bab22fb56c5ecff4295b (patch)
treec1606588aeae4535f0faa7942fcbe50e6e340f8b /tests/server/getpart.c
parentb228d2952b6762b5c9b851fba0cf391e80c6761a (diff)
downloadcurl-1c3e8bbfedcd3822aeb1bab22fb56c5ecff4295b.tar.gz
checksrc: warn for assignments within if() expressions
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
Diffstat (limited to 'tests/server/getpart.c')
-rw-r--r--tests/server/getpart.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index 1952fbbe5..25758bd4e 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -309,7 +309,8 @@ int getpart(char **outbuf, size_t *outlen,
ptr++;
end = ptr;
EAT_WORD(end);
- if((len.sig = end - ptr) > MAX_TAG_LEN) {
+ len.sig = end - ptr;
+ if(len.sig > MAX_TAG_LEN) {
error = GPE_NO_BUFFER_SPACE;
break;
}
@@ -370,7 +371,8 @@ int getpart(char **outbuf, size_t *outlen,
/* get potential tag */
end = ptr;
EAT_WORD(end);
- if((len.sig = end - ptr) > MAX_TAG_LEN) {
+ len.sig = end - ptr;
+ if(len.sig > MAX_TAG_LEN) {
error = GPE_NO_BUFFER_SPACE;
break;
}
@@ -389,7 +391,8 @@ int getpart(char **outbuf, size_t *outlen,
end = ptr;
while(*end && ('>' != *end))
end++;
- if((len.sig = end - ptr) > MAX_TAG_LEN) {
+ len.sig = end - ptr;
+ if(len.sig > MAX_TAG_LEN) {
error = GPE_NO_BUFFER_SPACE;
break;
}