summaryrefslogtreecommitdiffstats
path: root/libopkg/str_list.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/str_list.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/str_list.c')
-rw-r--r--libopkg/str_list.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libopkg/str_list.c b/libopkg/str_list.c
index be42967..a8e179d 100644
--- a/libopkg/str_list.c
+++ b/libopkg/str_list.c
@@ -33,9 +33,8 @@ void str_list_elt_deinit(str_list_elt_t *elt)
str_list_t *str_list_alloc()
{
- str_list_t *list = (str_list_t *)calloc(1, sizeof(str_list_t));
- if (list)
- str_list_init(list);
+ str_list_t *list = xcalloc(1, sizeof(str_list_t));
+ str_list_init(list);
return list;
}