From 9ddcbc0dd25d5ac6baacdf404dd9510e5da2534b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 1 May 2005 19:50:37 +0000 Subject: [PATCH] Introduced cfg_malloc_zero(). --- lib/conf.c | 8 +++++++- lib/conf.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) 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); /* -- 2.39.5