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 --- login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'login-utils/login.c') diff --git a/login-utils/login.c b/login-utils/login.c index ac76f6563..236da9b3d 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -1039,7 +1039,7 @@ static void init_environ(struct login_context *cxt) /* destroy environment unless user has requested preservation (-p) */ if (!cxt->keep_env) { - environ = (char **) xmalloc(sizeof(char *)); + environ = xmalloc(sizeof(char *)); memset(environ, 0, sizeof(char *)); } -- cgit v1.2.3-55-g7522