From: Alan T. DeKok Date: Thu, 4 Sep 2014 13:54:51 +0000 (-0400) Subject: Zero is false. found by cppcheck X-Git-Tag: release_3_0_5~628 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e30ca6ef8ef4d72da68ee0f7984ce92e582ed421;p=thirdparty%2Ffreeradius-server.git Zero is false. found by cppcheck --- diff --git a/src/main/parser.c b/src/main/parser.c index 2985d304269..34f4dd73a3a 100644 --- a/src/main/parser.c +++ b/src/main/parser.c @@ -1321,11 +1321,11 @@ done: /* * It's all digits, and therefore - * 'true'. + * 'false' if zero, and 'true' otherwise. */ if (!*q) { if (zeros) { - c->type = COND_TYPE_TRUE; + c->type = COND_TYPE_FALSE; } else { c->type = COND_TYPE_TRUE; }