summaryrefslogtreecommitdiffstats
path: root/libopkg/str_list.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
commit733d8409723a397b4ced39ea7aaab8bc8b4af5d9 (patch)
tree7138fbfc11577cf7d0fbae0ae7fa98a02ef63a8e /libopkg/str_list.c
parent1cefade73444d4670d9ae7c06e8f9cc55492fd79 (diff)
opkg: adding the hash_table_remove API, not using yet.
Just complete the API for future usage. Clean all the entry at initial time. This reduces planty of unnecessary check. In order to prevent this kind of bug, using calloc to replace most malloc git-svn-id: http://opkg.googlecode.com/svn/trunk@160 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/str_list.c')
-rw-r--r--libopkg/str_list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/str_list.c b/libopkg/str_list.c
index d6f9209..1d21746 100644
--- a/libopkg/str_list.c
+++ b/libopkg/str_list.c
@@ -31,7 +31,7 @@ void str_list_elt_deinit(str_list_elt_t *elt)
str_list_t *str_list_alloc()
{
- str_list_t *list = (str_list_t *)malloc(sizeof(str_list_t));
+ str_list_t *list = (str_list_t *)calloc(1, sizeof(str_list_t));
if (list)
str_list_init(list);
return list;