diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-09 21:22:55 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-09 21:22:55 +0200 |
commit | 06f3e569c7c153a5d0f2dc5667822c562e77ca9f (patch) | |
tree | 2a7c5ba3d7fa182edd3cf5d93d0629da22ae9880 /xalloc.h | |
parent | 194d9dc454d361ee5c707e71a5e3512fbe3a71cd (diff) | |
parent | 35d9ad9209592594905d1c8f15130d09af111411 (diff) | |
download | egawk-06f3e569c7c153a5d0f2dc5667822c562e77ca9f.tar.gz egawk-06f3e569c7c153a5d0f2dc5667822c562e77ca9f.tar.bz2 egawk-06f3e569c7c153a5d0f2dc5667822c562e77ca9f.zip |
Merge branch 'gawk-4.0-stable'
Diffstat (limited to 'xalloc.h')
-rw-r--r-- | xalloc.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -281,6 +281,16 @@ xcharalloc (size_t n) return XNMALLOC (n, char); } +/* Allocate S bytes of zeroed memory dynamically, with error checking. + There's no need for xnzalloc (N, S), since it would be equivalent + to xcalloc (N, S). */ + +inline void * +xzalloc (size_t s) +{ + return memset (xmalloc (s), 0, s); +} + # endif # ifdef __cplusplus |