From b1a67076a2dd6397bd4e4e7ed24f7de922893338 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Tue, 17 May 2011 16:29:29 +0000 Subject: [PATCH] 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 --- include/pub_tool_options.h | 2 ++ 1 file changed, 2 insertions(+) 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; \ }) \ ) -- 2.47.2