diff options
author | graham.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) |
commit | 480538737a8a9be074a1848f2e52cf2d1ff4709f (patch) | |
tree | e24d32dc46e0b83600aaa02a33ecaa6779765d9b /libopkg/opkg_install.c | |
parent | acd905996191df6ab59050bd179a5ed11e6f72a4 (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_install.c')
-rw-r--r-- | libopkg/opkg_install.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index 2d5bb4e..61563d6 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -600,14 +600,14 @@ static int pkg_remove_orphan_dependent(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old if (found) continue; d_str = old_pkg->depends_str[i]; - buf = calloc (1, strlen (d_str) + 1); + buf = xcalloc(1, strlen (d_str) + 1); j=0; while (d_str[j] != '\0' && d_str[j] != ' ') { buf[j]=d_str[j]; ++j; } buf[j]='\0'; - buf = realloc (buf, strlen (buf) + 1); + buf = xrealloc (buf, strlen (buf) + 1); p = pkg_hash_fetch_installed_by_name (&conf->pkg_hash, buf); if (!p) { fprintf(stderr, "The pkg %s had been removed!!\n", buf); |