mirror of
https://github.com/curl/curl.git
synced 2026-08-26 01:13:37 +03:00
ftp: fix Codacy/cppcheck warning about null pointer arithmetic
Increment `bytes` only if it is non-null. Closes https://github.com/curl/curl/pull/6576
This commit is contained in:
parent
ec5d9b44a2
commit
a3f93a62a2
1 changed files with 2 additions and 1 deletions
|
|
@ -2482,7 +2482,8 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
|
||||||
bytes--;
|
bytes--;
|
||||||
}
|
}
|
||||||
/* if we have nothing but digits: */
|
/* if we have nothing but digits: */
|
||||||
if(bytes++) {
|
if(bytes) {
|
||||||
|
++bytes;
|
||||||
/* get the number! */
|
/* get the number! */
|
||||||
(void)curlx_strtoofft(bytes, NULL, 0, &size);
|
(void)curlx_strtoofft(bytes, NULL, 0, &size);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue