diff options
author | Ruediger Meier | 2016-02-26 11:10:24 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-03-07 23:29:27 +0100 |
commit | fea1cbf7484df23a6fe0b62ccd1de271bc1f931a (patch) | |
tree | 047a4504053a7b449bce7695346a3f7edf78a068 /disk-utils/mkswap.c | |
parent | libfdisk: remove ifdef HDIO_GETGEO (diff) | |
download | kernel-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 'disk-utils/mkswap.c')
-rw-r--r-- | disk-utils/mkswap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 52ee8c65d..a7c6a709b 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -87,7 +87,7 @@ static void init_signature_page(struct mkswap_control *ctl) } else ctl->pagesize = kernel_pagesize; - ctl->signature_page = (unsigned long *) xcalloc(1, ctl->pagesize); + ctl->signature_page = xcalloc(1, ctl->pagesize); ctl->hdr = (struct swap_header_v1_2 *) ctl->signature_page; } |