summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorRuediger Meier2016-02-26 11:10:24 +0100
committerRuediger Meier2016-03-07 23:29:27 +0100
commitfea1cbf7484df23a6fe0b62ccd1de271bc1f931a (patch)
tree047a4504053a7b449bce7695346a3f7edf78a068 /term-utils/agetty.c
parentlibfdisk: remove ifdef HDIO_GETGEO (diff)
downloadkernel-qcow2-util-linux-fea1cbf7484df23a6fe0b62ccd1de271bc1f931a.tar.gz
kernel-qcow2-util-linux-fea1cbf7484df23a6fe0b62ccd1de271bc1f931a.tar.xz
kernel-qcow2-util-linux-fea1cbf7484df23a6fe0b62ccd1de271bc1f931a.zip
misc: never cast void* from malloc(3) and friends
Such cast could hide serious compiler warnings in case we are missing includes (e.g. <stdlib.h> or "xalloc.h"). See http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 55a00e125..1df1bc861 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1970,7 +1970,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
if (len < 0)
log_err(_("%s: invalid character conversion for login name"), op->tty);
- wcs = (wchar_t *) malloc((len + 1) * sizeof(wchar_t));
+ wcs = malloc((len + 1) * sizeof(wchar_t));
if (!wcs)
log_err(_("failed to allocate memory: %m"));