Remove some useless casts to (void *)

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-02-02T22:22:27Z
Lists: pgsql-hackers

Attachments

I have found that in some corners of the code some calls to standard C 
functions are decorated with casts to (void *) for no reason, and this 
code pattern then gets copied around.  I have gone through and cleaned 
this up a bit, in the attached patches.

The involved functions are: repalloc, memcpy, memset, memmove, memcmp, 
qsort, bsearch

Also hash_search(), for which there was a historical reason (the 
argument used to be char *), but not anymore.

Commits

  1. Remove useless casts to (void *) in arguments of some system functions

  2. Remove useless casts to (void *) in hash_search() calls