From: Matthew Fernandez Date: Sun, 20 Feb 2022 23:27:53 +0000 (-0800) Subject: cdt: [nfc] remove unnecessary casts of arguments to 'eventf' X-Git-Tag: 3.0.0~9^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9db17f3bfb2177610412f9d2d15188a1bf77f38;p=graphviz cdt: [nfc] remove unnecessary casts of arguments to 'eventf' --- diff --git a/lib/cdt/dtdisc.c b/lib/cdt/dtdisc.c index 66ec43fc0..fcbc74233 100644 --- a/lib/cdt/dtdisc.c +++ b/lib/cdt/dtdisc.c @@ -43,7 +43,7 @@ Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type) UNFLATTEN(dt); - if(old->eventf && (*old->eventf)(dt,DT_DISC,(void*)disc,old) < 0) + if(old->eventf && (*old->eventf)(dt, DT_DISC, disc, old) < 0) return NULL; dt->disc = disc; diff --git a/lib/cdt/dtmethod.c b/lib/cdt/dtmethod.c index 80fa1a10a..299434898 100644 --- a/lib/cdt/dtmethod.c +++ b/lib/cdt/dtmethod.c @@ -16,7 +16,7 @@ Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth) return oldmeth; if(disc->eventf && - (*disc->eventf)(dt,DT_METH,(void*)meth,disc) < 0) + (*disc->eventf)(dt, DT_METH, meth, disc) < 0) return NULL; dt->data->minp = 0; diff --git a/lib/cdt/dtopen.c b/lib/cdt/dtopen.c index b5cc90ed4..5bae1b75c 100644 --- a/lib/cdt/dtopen.c +++ b/lib/cdt/dtopen.c @@ -32,7 +32,7 @@ Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth) if(disc->eventf) { /* if shared/persistent dictionary, get existing data */ data = NULL; - if((e = (*disc->eventf)(dt,DT_OPEN,(void*)(&data),disc)) < 0) + if((e = (*disc->eventf)(dt, DT_OPEN, &data, disc)) < 0) goto err_open; else if(e > 0) { if(data) @@ -76,7 +76,7 @@ done: dt->meth = meth; if(disc->eventf) - (*disc->eventf)(dt, DT_ENDOPEN, (void*)dt, disc); + (*disc->eventf)(dt, DT_ENDOPEN, dt, disc); return dt; }