diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:55 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:55 +0200 |
commit | 9c9c4db6be078a48da3d7e520367ce9b4642ba17 (patch) | |
tree | c8ee66a7d8e819c6505349b3c498ef95dc94dd84 /common/partition.c | |
parent | 10a9a0aa1e3fefd5b3cdd391fa4851dab610d72d (diff) | |
download | barebox-9c9c4db6be078a48da3d7e520367ce9b4642ba17.tar.gz barebox-9c9c4db6be078a48da3d7e520367ce9b4642ba17.tar.xz |
svn_rev_456
use xzalloc
Diffstat (limited to 'common/partition.c')
-rw-r--r-- | common/partition.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/common/partition.c b/common/partition.c index 6c91a54ac5..e27010d577 100644 --- a/common/partition.c +++ b/common/partition.c @@ -132,11 +132,7 @@ int do_addpart ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) offset = 0; while (1) { - part = malloc(sizeof(struct partition)); - if(!part) { - printf("-ENOMEM\n"); - return 1; - } + part = xzalloc(sizeof(struct partition)); part->offset = offset; part->physdev = dev; |