|
From: <sv...@va...> - 2011-05-17 16:29:36
|
Author: sewardj
Date: 2011-05-17 17:29:29 +0100 (Tue, 17 May 2011)
New Revision: 11767
Log:
Better checking for command line options that should be either 'yes'
or 'no'. Fixes #269144. (a1...@pr..., Florian Krohm
<br...@ac...>)
Modified:
trunk/include/pub_tool_options.h
Modified: trunk/include/pub_tool_options.h
===================================================================
--- trunk/include/pub_tool_options.h 2011-05-17 16:19:53 UTC (rev 11766)
+++ trunk/include/pub_tool_options.h 2011-05-17 16:29:29 UTC (rev 11767)
@@ -54,6 +54,8 @@
Char* val = &(qq_arg)[ VG_(strlen)(qq_option)+1 ]; \
if VG_STREQ(val, "yes") (qq_var) = True; \
else if VG_STREQ(val, "no") (qq_var) = False; \
+ else VG_(fmsg_bad_option)(qq_arg, "Invalid boolean value '%s'" \
+ " (should be 'yes' or 'no')\n", val); \
True; \
}) \
)
|