diff libpurple/protocols/sametime/sametime.c @ 32210:3ef5e744589c

sametime: Avoid a theoretical null strcmp We don't ever call group_ensure() with a non-null group, and libmeanwhile takes steps to ensure a group never has a NULL name, so this can't happen. But this makes clang happier.
author Paul Aurich <paul@darkrain42.org>
date Thu, 21 Jul 2011 03:26:18 +0000
parents a8cc50c2279f
children c571dbf696da
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c	Thu Jul 21 03:16:51 2011 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Thu Jul 21 03:26:18 2011 +0000
@@ -922,6 +922,11 @@
   alias = mwSametimeGroup_getAlias(stgroup);
   type = mwSametimeGroup_getType(stgroup);
 
+  if (!name) {
+    DEBUG_WARN("Can't ensure a null group\n");
+    return
+  }
+
   DEBUG_INFO("attempting to ensure group %s, called %s\n",
 	     NSTR(name), NSTR(alias));