summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-07-30 19:00:53 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-07-30 19:00:53 +0000
commit7763c64ec86dca4e8a4adb1b5a27aad7a0fb0065 (patch)
treea104ec9b3de29b4d137e5cc142b3165cdecc3fa8
parentc178aa3e067f5f215fa828c9dece75a3bc0f7b10 (diff)
downloadgdm-7763c64ec86dca4e8a4adb1b5a27aad7a0fb0065.tar.gz
Use an assert to check that the array is not NULL before the loop rather
2007-07-11 Brian Cameron <brian.cameron@sun.com> * gui/gdmsetup.c: Use an assert to check that the array is not NULL before the loop rather than in the loop. svn path=/branches/gnome-2-18/; revision=5098
-rw-r--r--ChangeLog5
-rw-r--r--gui/gdmsetup.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d55649ac..a0673365 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-07-11 Brian Cameron <brian.cameron@sun.com>
+ * gui/gdmsetup.c: Use an assert to check that the array is not
+ NULL before the loop rather than in the loop.
+
+2007-07-11 Brian Cameron <brian.cameron@sun.com>
+
* daemon/misc.c: Remove setting hints.ai_family |= AF_INET6
since it turns out that this causes problems with fixing
bug #455190.
diff --git a/gui/gdmsetup.c b/gui/gdmsetup.c
index 82dc97ed..46f94deb 100644
--- a/gui/gdmsetup.c
+++ b/gui/gdmsetup.c
@@ -4220,7 +4220,8 @@ strings_list_remove (char *strings_list, const char *string, const char *sep)
msg = g_string_new ("");
actions = g_strsplit (strings_list, sep, -1);
- for (i = 0; actions != NULL && actions[i] != NULL; i++) {
+ g_assert (actions != NULL);
+ for (i = 0; actions[i] != NULL; i++) {
if (strncmp (actions[i], string, strlen (string)) == 0)
continue;
g_string_append_printf (msg, "%s%s", separator, actions[i]);