chiark / gitweb /
Static buffers: ipaddr_getbuf: Rename some variables
[secnet.git] / conffile.c
index 3ffbd9fd8274c2f3d3ceca8482770ae17951740d..f5a10a184a79566cd612da405ed9c69d333de596 100644 (file)
@@ -545,7 +545,7 @@ cstring_t *dict_keys(dict_t *dict)
 {
     atom_t *r, *j;
     struct entry *i;
-    r=safe_malloc(sizeof(*r)*(dict->size+1),"dict_keys");
+    NEW_ARY(r,dict->size+1);
     for (i=dict->entries, j=r; i; i=i->next, j++) {
        *j=i->key;
     }
@@ -705,7 +705,7 @@ const char **dict_read_string_array(dict_t *dict, cstring_t key,
     }
 
     int32_t ll=list_length(l);
-    ra=safe_malloc_ary(sizeof(*ra), ll+1, "dict_read_string_array");
+    NEW_ARY(ra, ll+1);
     for (rap=ra; l; l=l->next,rap++) {
        item_t *it=l->item;
        if (it->type!=t_string)