[empathy/mc5] Use g_str_has_prefix convenience function for clarity



commit 9498d6a67a0085d0bab3e49cd11288daa6474771
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Sun Aug 23 15:00:28 2009 +0100

    Use g_str_has_prefix convenience function for clarity

 src/empathy-import-mc4-accounts.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-import-mc4-accounts.c b/src/empathy-import-mc4-accounts.c
index 4ce8d4e..8fa8d58 100644
--- a/src/empathy-import-mc4-accounts.c
+++ b/src/empathy-import-mc4-accounts.c
@@ -19,6 +19,7 @@
  * Authors: Arnaud Maillet <arnaud maillet collabora co uk>
  */
 
+#include <stdio.h>
 #include <string.h>
 #include <glib.h>
 #include <gconf/gconf-client.h>
@@ -120,7 +121,7 @@ _account_name_from_key (const gchar *key)
   guint base_len = strlen (MC_ACCOUNTS_GCONF_BASE);
   const gchar *base, *slash;
 
-  g_assert (key == strstr (key, MC_ACCOUNTS_GCONF_BASE));
+  g_assert (g_str_has_prefix (key, MC_ACCOUNTS_GCONF_BASE));
   g_assert (strlen (key) > base_len + 1);
 
   base = key + base_len + 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]