]> granicus.if.org Git - graphviz/commitdiff
cdt: [nfc] remove some unnecessary casts of 'void*' during assignment
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Feb 2022 23:42:20 +0000 (15:42 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Feb 2022 04:41:47 +0000 (20:41 -0800)
lib/cdt/dthash.c
lib/cdt/dtstrhash.c
lib/cdt/dttree.c

index a36b7301400f811b170a54bec2a4ed6728afc65f..4c1869ee7afb7d72bd9886c84b9deb0bea68f8a2 100644 (file)
@@ -155,7 +155,7 @@ static void* dthash(Dt_t* dt, void* obj, int type)
                goto do_search;
        }
        else if(type&(DT_RENEW|DT_VSEARCH) )
-       {       r = (Dtlink_t*)obj;
+       {       r = obj;
                obj = _DTOBJ(r,lk);
                key = _DTKEY(obj,ky,sz);
                hsh = r->hash;
index afef982358dc975c52222974119167b0a3d9eb6c..f003940385f4456ca014078a743ef08ba0c87a24 100644 (file)
@@ -15,7 +15,7 @@
 
 uint dtstrhash(uint h, void* args, int n)
 {
-       unsigned char*  s = (unsigned char*)args;
+       unsigned char *s = args;
 
        if(n <= 0)
        {       for(; *s != 0; s += s[1] ? 2 : 1)
index 9b7f8656b5a905e35237612465fc00f3a03382ba..0f66358a20add599e2d53c9c29caf705d8f649e6 100644 (file)
@@ -85,7 +85,7 @@ static void* dttree(Dt_t* dt, void* obj, int type)
                        goto do_search;
        }
        else if(type&DT_RENEW)
-       {       me = (Dtlink_t*)obj;
+       {       me = obj;
                obj = _DTOBJ(me,lk);
                key = _DTKEY(obj,ky,sz);
                if(root)