Silence a compiler warning
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jun 2011 14:16:35 +0000 (10:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jun 2011 14:16:35 +0000 (10:16 -0400)
Even though we are confident the filename will always
end in .gmarkup, the compiler doesn't know that...

glib/tests/markup-parse.c

index a1fbf38..fa45b77 100644 (file)
@@ -216,7 +216,8 @@ get_expected_filename (const gchar *filename)
 
   f = g_strdup (filename);
   p = strstr (f, ".gmarkup");
-  *p = 0;
+  if (p)
+    *p = 0;
   expected = g_strconcat (f, ".expected", NULL);
   g_free (f);