]> granicus.if.org Git - graphviz/commitdiff
colorcmpf: remove unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 29 Aug 2021 23:19:20 +0000 (16:19 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 4 Sep 2021 02:26:35 +0000 (19:26 -0700)
These pointers implicitly coerce.

cmd/tools/colxlate.c

index e7834547f4b0e7768172b8df5e98b68c292e3add..2139bdc9839dffdde6e6a86629342d1dc77072ab 100644 (file)
@@ -59,8 +59,8 @@ static unsigned char *canoncolor(char *orig, unsigned char *out)
 
 static int colorcmpf(const void *a0, const void *a1)
 {
-    const hsbcolor_t *p0 = (const hsbcolor_t *) a0;
-    const hsbcolor_t *p1 = (const hsbcolor_t *) a1;
+    const hsbcolor_t *p0 = a0;
+    const hsbcolor_t *p1 = a1;
     int i = (p0->name[0] - p1->name[0]);
     return (i ? i : strcmp(p0->name, p1->name));
 }