util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH] wipefs: use xalloc lib
Date: Wed, 14 Dec 2011 18:58:26 +0100	[thread overview]
Message-ID: <1323885506.1255.1.camel@offworld> (raw)

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

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 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

             reply	other threads:[~2011-12-14 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 17:58 Davidlohr Bueso [this message]
2011-12-16 11:47 ` [PATCH] wipefs: use xalloc lib Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323885506.1255.1.camel@offworld \
    --to=dave@gnu.org \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).