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:
parent
1487a24238
commit
6b3cfabfd4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue