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:
Marcel Raad 2021-02-06 10:26:38 +01:00
parent ec5d9b44a2
commit a3f93a62a2
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02
1 changed files with 2 additions and 1 deletions

View File

@ -2482,7 +2482,8 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
bytes--;
}
/* if we have nothing but digits: */
if(bytes++) {
if(bytes) {
++bytes;
/* get the number! */
(void)curlx_strtoofft(bytes, NULL, 0, &size);
}