* xfont.c (compare_font_names): Redo to omit the need for casts.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Jul 2012 20:49:23 +0000 (13:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Jul 2012 20:49:23 +0000 (13:49 -0700)
src/ChangeLog
src/xfont.c

index cfabe84..9645877 100644 (file)
@@ -1,3 +1,7 @@
+2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xfont.c (compare_font_names): Redo to omit the need for casts.
+
 2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 
        * xfns.c (Fx_change_window_property): Doc fix.
index cc06e27..b7a1e06 100644 (file)
@@ -164,8 +164,9 @@ xfont_get_cache (FRAME_PTR f)
 static int
 compare_font_names (const void *name1, const void *name2)
 {
-  return xstrcasecmp (*(const char **) name1,
-                     *(const char **) name2);
+  char *const *n1 = name1;
+  char *const *n2 = name2;
+  return xstrcasecmp (*n1, *n2);
 }
 
 /* Decode XLFD as iso-8859-1 into OUTPUT, and return the byte length