From: Julian Seward Date: Tue, 17 May 2011 16:29:29 +0000 (+0000) Subject: Better checking for command line options that should be either 'yes' X-Git-Tag: svn/VALGRIND_3_7_0~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1a67076a2dd6397bd4e4e7ed24f7de922893338;p=thirdparty%2Fvalgrind.git Better checking for command line options that should be either 'yes' or 'no'. Fixes #269144. (a125246@prtnx.com, Florian Krohm ) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11767 --- diff --git a/include/pub_tool_options.h b/include/pub_tool_options.h index 3dffd42b5b..50493d772d 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; \ }) \ )