From: Matthew Fernandez Date: Sun, 20 Feb 2022 23:42:20 +0000 (-0800) Subject: cdt: [nfc] remove some unnecessary casts of 'void*' during assignment X-Git-Tag: 3.0.0~9^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27a937594339f53d07336240efb1f7749d3845af;p=graphviz cdt: [nfc] remove some unnecessary casts of 'void*' during assignment --- diff --git a/lib/cdt/dthash.c b/lib/cdt/dthash.c index a36b73014..4c1869ee7 100644 --- a/lib/cdt/dthash.c +++ b/lib/cdt/dthash.c @@ -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; diff --git a/lib/cdt/dtstrhash.c b/lib/cdt/dtstrhash.c index afef98235..f00394038 100644 --- a/lib/cdt/dtstrhash.c +++ b/lib/cdt/dtstrhash.c @@ -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) diff --git a/lib/cdt/dttree.c b/lib/cdt/dttree.c index 9b7f8656b..0f66358a2 100644 --- a/lib/cdt/dttree.c +++ b/lib/cdt/dttree.c @@ -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)