mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
checksrc: warn for assignments within if() expressions
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
This commit is contained in:
parent
b228d2952b
commit
1c3e8bbfed
86 changed files with 413 additions and 226 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue