]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
wipefs: use xalloc lib
authorDavidlohr Bueso <dave@gnu.org>
Wed, 14 Dec 2011 17:56:57 +0000 (18:56 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 16 Dec 2011 11:42:40 +0000 (12:42 +0100)
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
misc-utils/wipefs.c

index f79fa3c6eb05d119bc57bd80d035210612cc4c06..92f410164015ead9346f88d9a192f77cc77a1d35 100644 (file)
@@ -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;