From 0d044d1cb28fd0d7f8f1c99222fef2ba49c85ee0 Mon Sep 17 00:00:00 2001 From: vapier Date: Sat, 11 Jun 2005 22:25:27 +0000 Subject: use xmalloc() instead of malloc() git-svn-id: svn://busybox.net/trunk/busybox@10531 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- e2fsprogs/e2p/feature.c | 4 +--- e2fsprogs/e2p/mntopts.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/e2fsprogs/e2p/feature.c b/e2fsprogs/e2p/feature.c index f4e920a98..a4f3c64cb 100644 --- a/e2fsprogs/e2p/feature.c +++ b/e2fsprogs/e2p/feature.c @@ -154,9 +154,7 @@ int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array) unsigned int mask; int compat_type; - buf = malloc(strlen(str)+1); - if (!buf) - return 1; + buf = xmalloc(strlen(str)+1); strcpy(buf, str); cp = buf; while (cp && *cp) { diff --git a/e2fsprogs/e2p/mntopts.c b/e2fsprogs/e2p/mntopts.c index 6d0eca0ae..735260ce0 100644 --- a/e2fsprogs/e2p/mntopts.c +++ b/e2fsprogs/e2p/mntopts.c @@ -99,9 +99,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok) int neg; unsigned int mask; - buf = malloc(strlen(str)+1); - if (!buf) - return 1; + buf = xmalloc(strlen(str)+1); strcpy(buf, str); cp = buf; while (cp && *cp) { -- cgit v1.2.3-55-g6feb