From fea1cbf7484df23a6fe0b62ccd1de271bc1f931a Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Fri, 26 Feb 2016 11:10:24 +0100 Subject: misc: never cast void* from malloc(3) and friends Such cast could hide serious compiler warnings in case we are missing includes (e.g. or "xalloc.h"). See http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc Signed-off-by: Ruediger Meier --- lib/setproctitle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/setproctitle.c') diff --git a/lib/setproctitle.c b/lib/setproctitle.c index 4bcf8c8a9..93bc82e47 100644 --- a/lib/setproctitle.c +++ b/lib/setproctitle.c @@ -33,7 +33,7 @@ void initproctitle (int argc, char **argv) for (i = 0; envp[i] != NULL; i++) continue; - environ = (char **) malloc(sizeof(char *) * (i + 1)); + environ = malloc(sizeof(char *) * (i + 1)); if (environ == NULL) return; -- cgit v1.2.3-55-g7522