From 480538737a8a9be074a1848f2e52cf2d1ff4709f Mon Sep 17 00:00:00 2001 From: graham.gower Date: Wed, 04 Nov 2009 23:20:09 -0500 Subject: s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/ And redundant error checking removed from the places where allocation failures were actually checked. git-svn-id: http://opkg.googlecode.com/svn/trunk@259 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg.c') diff --git a/libopkg/opkg.c b/libopkg/opkg.c index 4375440..d7948e9 100644 --- a/libopkg/opkg.c +++ b/libopkg/opkg.c @@ -162,7 +162,7 @@ opkg_package_new () opkg_package_t *p; - p = calloc (1, sizeof (opkg_package_t)); + p = xcalloc(1, sizeof (opkg_package_t)); return p; } @@ -187,9 +187,9 @@ opkg_new () opkg_t *opkg; int err; - opkg = calloc (1, sizeof (opkg_t)); + opkg = xcalloc(1, sizeof (opkg_t)); - opkg->args = calloc (1, sizeof (args_t)); + opkg->args = xcalloc(1, sizeof (args_t)); err = args_init (opkg->args); if (err) { @@ -198,7 +198,7 @@ opkg_new () return NULL; } - opkg->conf = calloc (1, sizeof (opkg_conf_t)); + opkg->conf = xcalloc(1, sizeof (opkg_conf_t)); err = opkg_conf_init (opkg->conf, opkg->args); if (err) { -- cgit v0.9.1