From e38d3ef5de4736004b97321af1f172336d7e26dc Mon Sep 17 00:00:00 2001 From: g Date: Thu, 30 Oct 2003 18:21:53 +0000 Subject: [PATCH] Better message. git-svn-id: file:///srv/svn/gliv/trunk@133 dbf4865f-1ec6-0310-8412-f61adeb1ccb1 committer: g --- src/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index 12ac02b..5d618fc 100644 --- a/src/main.c +++ b/src/main.c @@ -154,18 +154,16 @@ void destroy_ggo_flags(struct gengetopt_args_info *ggo) /* May exit :) */ gboolean get_on_off(const gchar * str) { - const gchar * ptr = str; - if (str == NULL) return TRUE; - while (*ptr == '=' || *ptr == ' ') - ptr++; + while (*str == '=' || *str == ' ') + str++; - if (g_str_equal(ptr, "on")) + if (g_str_equal(str, "on")) return TRUE; - if (g_str_equal(ptr, "off")) + if (g_str_equal(str, "off")) return FALSE; ERROR_MSG(_("Command line flags should be on or off, not %s\n"), str); -- 2.11.4.GIT