From: Matthew Fernandez Date: Sun, 20 Feb 2022 23:30:08 +0000 (-0800) Subject: cdt: [nfc] remove unnecessary casts of arguments to 'searchf' X-Git-Tag: 3.0.0~9^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec9b9d1bc5e3b877eb015e19ca6c27353570154b;p=graphviz cdt: [nfc] remove unnecessary casts of arguments to 'searchf' --- diff --git a/lib/cdt/dtdisc.c b/lib/cdt/dtdisc.c index fcbc74233..6018e9b34 100644 --- a/lib/cdt/dtdisc.c +++ b/lib/cdt/dtdisc.c @@ -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; } } diff --git a/lib/cdt/dtmethod.c b/lib/cdt/dtmethod.c index 299434898..3fba892ee 100644 --- a/lib/cdt/dtmethod.c +++ b/lib/cdt/dtmethod.c @@ -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; } } diff --git a/lib/cdt/dtrenew.c b/lib/cdt/dtrenew.c index d7db5051d..5557b2751 100644 --- a/lib/cdt/dtrenew.c +++ b/lib/cdt/dtrenew.c @@ -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; } diff --git a/lib/cdt/dtrestore.c b/lib/cdt/dtrestore.c index 1b00d8a06..40049f4cc 100644 --- a/lib/cdt/dtrestore.c +++ b/lib/cdt/dtrestore.c @@ -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; } }