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:
Murai Takashi
2020-06-26 23:50:53 +00:00
committed by waddlesplash
parent 1487a24238
commit 6b3cfabfd4
+1 -1
View File
@@ -99,7 +99,7 @@ BHttpResult::Length() const
*
* We can check length[0] directly because header values are trimmed by
* HttpHeader beforehand. */
if (length[0] != '-' || length[0] != '+') {
if (length[0] != '-' && length[0] != '+') {
errno = 0;
char *endptr = NULL;
result = strtoul(length, &endptr, 10);