From 2a6150bc06f257c7693edb6deb370c4da1092a80 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 6 Mar 2007 07:22:04 +0000 Subject: [PATCH] Remove a NULL check that didn't do any good. (#360904, Paolo Borelli) 2007-03-06 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_boolean): Remove a NULL check that didn't do any good. (#360904, Paolo Borelli) svn path=/trunk/; revision=5375 --- ChangeLog | 6 ++++++ glib/gkeyfile.c | 11 ++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d6f74529..f7d837c9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-06 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_parse_value_as_boolean): + Remove a NULL check that didn't do any good. (#360904, + Paolo Borelli) + 2007-03-06 Matthias Clasen * glib/gmarkup.c (g_markup_parse_context_parse): Report diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 6b8d5d3c4..4ac63a664 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -3589,13 +3589,10 @@ g_key_file_parse_value_as_boolean (GKeyFile *key_file, { gchar *value_utf8; - if (value) - { - if (strcmp (value, "true") == 0 || strcmp (value, "1") == 0) - return TRUE; - else if (strcmp (value, "false") == 0 || strcmp (value, "0") == 0) - return FALSE; - } + if (strcmp (value, "true") == 0 || strcmp (value, "1") == 0) + return TRUE; + else if (strcmp (value, "false") == 0 || strcmp (value, "0") == 0) + return FALSE; value_utf8 = _g_utf8_make_valid (value); g_set_error (error, G_KEY_FILE_ERROR,