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 <leorize+oss@disroot.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Murai Takashi 2020-06-25 07:04:10 +09:00 committed by waddlesplash
parent 1487a24238
commit 6b3cfabfd4
1 changed files with 1 additions and 1 deletions

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);