]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Zero is false. found by cppcheck
authorAlan T. DeKok <aland@freeradius.org>
Thu, 4 Sep 2014 13:54:51 +0000 (09:54 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 4 Sep 2014 13:54:51 +0000 (09:54 -0400)
src/main/parser.c

index 2985d30426912e01e538cee6e5b9eb005e3c4b7f..34f4dd73a3a5b4e15c887736e724adda34446fec 100644 (file)
@@ -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;
                                        }