]> granicus.if.org Git - graphviz/commitdiff
pango plugin: remove unnecessary casts around 'us->data'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 26 Nov 2021 17:52:11 +0000 (09:52 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 3 Dec 2021 01:12:50 +0000 (17:12 -0800)
plugin/pango/gvloadimage_pango.c

index d6af76f93aa9589005bce926db057e5f6b3027ec..9e9100c5369bd581b8e3917765229cc915350b85 100644 (file)
@@ -33,7 +33,7 @@ reader (void *closure, unsigned char *data, unsigned int length)
 
 static void cairo_freeimage(usershape_t *us)
 {
-    cairo_surface_destroy((cairo_surface_t*)(us->data));
+    cairo_surface_destroy(us->data);
 }
 
 static cairo_surface_t* cairo_loadimage(GVJ_t * job, usershape_t *us)
@@ -47,7 +47,7 @@ static cairo_surface_t* cairo_loadimage(GVJ_t * job, usershape_t *us)
 
     if (us->data) {
         if (us->datafree == cairo_freeimage)
-             surface = (cairo_surface_t*)(us->data); /* use cached data */
+             surface = us->data; /* use cached data */
         else {
              us->datafree(us);        /* free incompatible cache data */
              us->datafree = NULL;
@@ -69,7 +69,7 @@ static cairo_surface_t* cairo_loadimage(GVJ_t * job, usershape_t *us)
                 surface = NULL;
         }
         if (surface) {
-            us->data = (void*)surface;
+            us->data = surface;
             us->datafree = cairo_freeimage;
         }
        gvusershape_file_release(us);