Author: njn
Date: 2007-11-26 00:00:32 +0000 (Mon, 26 Nov 2007)
New Revision: 7221

Log:
Fix NUM_CLO checking.

Modified:
   trunk/include/pub_tool_options.h


Modified: trunk/include/pub_tool_options.h
===================================================================
--- trunk/include/pub_tool_options.h    2007-11-25 23:56:12 UTC (rev 7220)
+++ trunk/include/pub_tool_options.h    2007-11-26 00:00:32 UTC (rev 7221)
@@ -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. 
*/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to