Better checking for command line options that should be either 'yes'
or 'no'. Fixes #269144. (a125246@prtnx.com, Florian Krohm
<britzel@acm.org>)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11767 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_options.h b/include/pub_tool_options.h
index 3dffd42..50493d7 100644
--- a/include/pub_tool_options.h
+++ b/include/pub_tool_options.h
@@ -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; \
}) \
)