]> granicus.if.org Git - graphviz/commitdiff
cdt: [nfc] remove unnecessary casts of arguments to 'eventf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Feb 2022 23:27:53 +0000 (15:27 -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/dtopen.c

index 66ec43fc01a8ed8d5cda43cfc57f02154001716a..fcbc74233d8e3303f9624f289ceb874a42fab627 100644 (file)
@@ -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;
index 80fa1a10a0e48f28826c840b3c6367d5267f1741..29943489845a4b0fea9ddf142db746177e07b86f 100644 (file)
@@ -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;
index b5cc90ed4222da746a150f347791f571ce61b3a7..5bae1b75c4985fa408f0f2b0d61a7212ca2904f2 100644 (file)
@@ -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;
 }