summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdformat.c
diff options
context:
space:
mode:
authorSami Kerola2011-07-11 18:01:24 +0200
committerSami Kerola2011-07-11 18:45:37 +0200
commita53b31d0bd8ec5d23d2a250b2f45143be83ee02e (patch)
treeb3ca2272c318f898e72407be674566014437fe51 /disk-utils/fdformat.c
parentfdformat: integer comparisons & unused parameter (diff)
downloadkernel-qcow2-util-linux-a53b31d0bd8ec5d23d2a250b2f45143be83ee02e.tar.gz
kernel-qcow2-util-linux-a53b31d0bd8ec5d23d2a250b2f45143be83ee02e.tar.xz
kernel-qcow2-util-linux-a53b31d0bd8ec5d23d2a250b2f45143be83ee02e.zip
fdformat: use xalloc.h
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/fdformat.c')
-rw-r--r--disk-utils/fdformat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c
index d525f5302..3d3512200 100644
--- a/disk-utils/fdformat.c
+++ b/disk-utils/fdformat.c
@@ -19,6 +19,7 @@
#include "c.h"
#include "nls.h"
+#include "xalloc.h"
struct floppy_struct param;
@@ -60,8 +61,7 @@ static void verify_disk(char *name)
int fd,cyl_size,count;
cyl_size = param.sect*param.head*512;
- if ((data = (unsigned char *) malloc(cyl_size)) == NULL)
- err(EXIT_FAILURE, "malloc");
+ data = xmalloc(cyl_size);
printf(_("Verifying ... "));
fflush(stdout);
if ((fd = open(name,O_RDONLY)) < 0)