From: Duncan Mac-Vicar P Date: Fri, 22 Aug 2008 16:10:19 +0000 (+0000) Subject: - comment function X-Git-Tag: BASE-SuSE-Code-12_1-Branch~558 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1f63675905f1f480757f00bebcfde0e4642263d;p=platform%2Fupstream%2Flibsolv.git - comment function --- diff --git a/src/util.h b/src/util.h index 5488965..c5d3d15 100644 --- a/src/util.h +++ b/src/util.h @@ -16,6 +16,10 @@ #include #include +/** + * malloc + * exits with error message on error + */ extern void *sat_malloc(size_t); extern void *sat_malloc2(size_t, size_t); extern void *sat_calloc(size_t, size_t); @@ -39,6 +43,14 @@ static inline void *sat_extend(void *buf, size_t len, size_t nmemb, size_t size, return buf; } +/** + * extend an array by reallocation and zero's the new section + * buf old pointer + * len current size + * nmbemb number of elements to add + * size size of each element + * block block size used to allocate the elements + */ static inline void *sat_zextend(void *buf, size_t len, size_t nmemb, size_t size, size_t block) { buf = sat_extend(buf, len, nmemb, size, block);