[PATCH] wipefs: use xalloc lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Davidlohr Bueso <dave@xxxxxxx>
Date: Wed, 14 Dec 2011 18:56:57 +0100

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 misc-utils/wipefs.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
index f79fa3c..92f4101 100644
--- a/misc-utils/wipefs.c
+++ b/misc-utils/wipefs.c
@@ -132,10 +132,7 @@ add_offset(struct wipe_desc *wp0, loff_t offset, int zap)
 		wp = wp->next;
 	}
 
-	wp = calloc(1, sizeof(struct wipe_desc));
-	if (!wp)
-		err(EXIT_FAILURE, _("calloc failed"));
-
+	wp = xcalloc(1, sizeof(struct wipe_desc));
 	wp->offset = offset;
 	wp->next = wp0;
 	wp->zap = zap;
-- 
1.7.7.3



--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux