From a53b31d0bd8ec5d23d2a250b2f45143be83ee02e Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 11 Jul 2011 18:01:24 +0200 Subject: fdformat: use xalloc.h Signed-off-by: Sami Kerola --- disk-utils/fdformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'disk-utils/fdformat.c') 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) -- cgit v1.2.3-55-g7522