summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_cmd.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-04 23:20:09 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-04 23:20:09 (EST)
commit480538737a8a9be074a1848f2e52cf2d1ff4709f (patch)
treee24d32dc46e0b83600aaa02a33ecaa6779765d9b /libopkg/opkg_cmd.c
parentacd905996191df6ab59050bd179a5ed11e6f72a4 (diff)
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
Diffstat (limited to 'libopkg/opkg_cmd.c')
-rw-r--r--libopkg/opkg_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 9c1612b..807777e 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -306,7 +306,7 @@ static opkg_intercept_t opkg_prep_intercepts(opkg_conf_t *conf)
char *newpath;
int gen;
- ctx = calloc (1, sizeof (*ctx));
+ ctx = xcalloc(1, sizeof (*ctx));
ctx->oldpath = xstrdup(getenv("PATH"));
sprintf_alloc (&newpath, "%s/opkg/intercept:%s", DATADIR, ctx->oldpath);
@@ -877,7 +877,7 @@ static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv)
available = pkg_vec_alloc();
pkg_hash_fetch_all_installed(&conf->pkg_hash, available);
for (i=0; i < argc; i++) {
- pkg_name = calloc(1, strlen(argv[i])+2);
+ pkg_name = xcalloc(1, strlen(argv[i])+2);
strcpy(pkg_name,argv[i]);
for (a=0; a < available->len; a++) {
pkg = available->pkgs[a];