]> granicus.if.org Git - graphviz/commitdiff
cdt: [nfc] remove unnecessary casts of arguments to 'searchf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Feb 2022 23:30:08 +0000 (15:30 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Feb 2022 04:41:47 +0000 (20:41 -0800)
lib/cdt/dtdisc.c
lib/cdt/dtmethod.c
lib/cdt/dtrenew.c
lib/cdt/dtrestore.c

index fcbc74233d8e3303f9624f289ceb874a42fab627..6018e9b34c80c703191f9ae0659f977a312673c2 100644 (file)
@@ -86,7 +86,7 @@ Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type)
                                k = _DTKEY((void*)k,disc->key,disc->size);
                                r->hash = _DTHSH(dt,k,disc,disc->size);
                        }
-                       (void)(*searchf)(dt,(void*)r,DT_RENEW);
+                       (void)(*searchf)(dt, r, DT_RENEW);
                        r = t;
                }
        }
index 29943489845a4b0fea9ddf142db746177e07b86f..3fba892ee9a214c29bf156c738dd234e629a4097 100644 (file)
@@ -54,7 +54,7 @@ Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth)
        {       dt->data->size = 0;
                while(list)
                {       r = list->right;
-                       (*meth->searchf)(dt,(void*)list,DT_RENEW);
+                       (*meth->searchf)(dt, list, DT_RENEW);
                        list = r;
                }
        }
@@ -72,7 +72,7 @@ Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth)
                                key = _DTKEY(key,disc->key,disc->size);
                                list->hash = _DTHSH(dt,key,disc,disc->size);
                        }
-                       (void)(*meth->searchf)(dt,(void*)list,DT_RENEW);
+                       (void)(*meth->searchf)(dt, list, DT_RENEW);
                        list = r;
                }
        }
index d7db5051dfe7321cfaf92ef3acf147c759057aef..5557b2751666050d0eb835be174b556bdeff05b5 100644 (file)
@@ -48,5 +48,5 @@ void* dtrenew(Dt_t* dt, void* obj)
        }
 
        dt->data->size -= 1;
-       return (*dt->meth->searchf)(dt,(void*)e,DT_RENEW) ? obj : NULL;
+       return (*dt->meth->searchf)(dt, e, DT_RENEW) ? obj : NULL;
 }
index 1b00d8a06f79846e7c873b15272976d441e51fc2..40049f4ccb19c6e98362e3d302e2342b921411a7 100644 (file)
@@ -42,7 +42,7 @@ int dtrestore(Dt_t* dt, Dtlink_t* list)
                {       dt->data->size = 0;
                        while(list)
                        {       t = list->right;
-                               (*searchf)(dt,(void*)list,DT_RENEW);
+                               (*searchf)(dt, list, DT_RENEW);
                                list = t;
                        }
                }