From: Martin Mares Date: Sun, 1 May 2005 19:50:37 +0000 (+0000) Subject: Introduced cfg_malloc_zero(). X-Git-Tag: holmes-import~782 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9ddcbc0dd25d5ac6baacdf404dd9510e5da2534b;p=libucw.git Introduced cfg_malloc_zero(). --- diff --git a/lib/conf.c b/lib/conf.c index de659810..2293cdae 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -2,7 +2,7 @@ * UCW Library -- Reading of configuration files * * (c) 2001 Robert Spalek - * (c) 2003 Martin Mares + * (c) 2003--2005 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -46,6 +46,12 @@ cfg_malloc(uns size) return mp_alloc(cfpool, size); } +void * +cfg_malloc_zero(uns size) +{ + return mp_alloc_zero(cfpool, size); +} + byte * cfg_strdup(byte *s) { diff --git a/lib/conf.h b/lib/conf.h index 608904b1..85a9ebe5 100644 --- a/lib/conf.h +++ b/lib/conf.h @@ -2,7 +2,7 @@ * UCW Library -- Reading of configuration files * * (c) 2001 Robert Spalek - * (c) 2003 Martin Mares + * (c) 2003--2005 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -19,6 +19,7 @@ extern struct mempool *cfpool; void *cfg_malloc(uns size); +void *cfg_malloc_zero(uns size); byte *cfg_strdup(byte *s); /*