From: Nicholas Nethercote Date: Mon, 26 Nov 2007 00:00:32 +0000 (+0000) Subject: Fix NUM_CLO checking. X-Git-Tag: svn/VALGRIND_3_3_0~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73f9cade8f7e0f011e89015aab8b5420955c2ba6;p=thirdparty%2Fvalgrind.git Fix NUM_CLO checking. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7221 --- diff --git a/include/pub_tool_options.h b/include/pub_tool_options.h index 7ecac7799c..8214525af8 100644 --- a/include/pub_tool_options.h +++ b/include/pub_tool_options.h @@ -56,7 +56,7 @@ Long n = VG_(strtoll10)( &qq_arg[ VG_(strlen)(qq_option)+1 ], &s );\ (qq_var) = n; \ /* Check for non-numeralness, or overflow */ \ - if ('\0' != s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \ + if ('\0' == s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \ } /* Same as VG_NUM_CLO but does not coerce the result value to 32 bits @@ -67,7 +67,7 @@ Long n = VG_(strtoll10)( &qq_arg[ VG_(strlen)(qq_option)+1 ], &s );\ (qq_var) = n; \ /* Check for non-numeralness */ \ - if ('\0' != s[0]) VG_(err_bad_option)(qq_arg); \ + if ('\0' == s[0]) VG_(err_bad_option)(qq_arg); \ } /* Bounded integer arg */ @@ -77,7 +77,7 @@ Long n = VG_(strtoll10)( &qq_arg[ VG_(strlen)(qq_option)+1 ], &s );\ (qq_var) = n; \ /* Check for non-numeralness, or overflow */ \ - if ('\0' != s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \ + if ('\0' == s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \ if ((qq_var) < (qq_lo)) (qq_var) = (qq_lo); \ if ((qq_var) > (qq_hi)) (qq_var) = (qq_hi); \ } @@ -89,7 +89,7 @@ double n = VG_(strtod)( &qq_arg[ VG_(strlen)(qq_option)+1 ], &s );\ (qq_var) = n; \ /* Check for non-numeralness */ \ - if ('\0' != s[0]) VG_(err_bad_option)(qq_arg); \ + if ('\0' == s[0]) VG_(err_bad_option)(qq_arg); \ } /* Bool arg whose value is denoted by the exact presence of the given string. */