CLEANUP: Do not use a fixed type for 'sizeof' in 'calloc'
Changes performed using the following coccinelle patch:
@@
type T;
expression E;
expression t;
@@
(
t = calloc(E, sizeof(*t))
|
- t = calloc(E, sizeof(T))
+ t = calloc(E, sizeof(*t))
)
Looking through the commit history, grepping for coccinelle shows that the same
replacement with a different patch was already performed in the past in commit
02779b6263a177b1e462e53db6eaf57bcda574bc.
diff --git a/src/uri_auth.c b/src/uri_auth.c
index 57dbadb..27cb66e 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -226,7 +226,7 @@
return NULL;
if (!u->userlist)
- u->userlist = calloc(1, sizeof(struct userlist));
+ u->userlist = calloc(1, sizeof(*u->userlist));
if (!u->userlist)
return NULL;