libnetapi: Fix if condition
Fix length[0] != '+' could not be checked. Pointed out by cppcheck. Change-Id: Ic4697dc9ffd04afcd92ef3ed65485e1fe3f32e76 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2950 Reviewed-by: leorize <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
1487a24238
commit
6b3cfabfd4
@@ -99,7 +99,7 @@ BHttpResult::Length() const
|
|||||||
*
|
*
|
||||||
* We can check length[0] directly because header values are trimmed by
|
* We can check length[0] directly because header values are trimmed by
|
||||||
* HttpHeader beforehand. */
|
* HttpHeader beforehand. */
|
||||||
if (length[0] != '-' || length[0] != '+') {
|
if (length[0] != '-' && length[0] != '+') {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
char *endptr = NULL;
|
char *endptr = NULL;
|
||||||
result = strtoul(length, &endptr, 10);
|
result = strtoul(length, &endptr, 10);
|
||||||
|
|||||||
Reference in New Issue
Block a user