From: Davidlohr Bueso Date: Wed, 14 Dec 2011 17:56:57 +0000 (+0100) Subject: wipefs: use xalloc lib X-Git-Tag: v2.21-rc1~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2f5c22173f6af9a181646a90f5f5f009450661c;p=thirdparty%2Futil-linux.git wipefs: use xalloc lib Signed-off-by: Davidlohr Bueso --- diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index f79fa3c6eb..92f4101640 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;