mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
nasmlib.h: add nasm_zeron()
Add a nasm_zeron() convenience macro to match nasm_zero(); compare nasm_new() vs nasm_newn(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
d97cceed61
commit
90303022b4
@ -172,6 +172,7 @@ char * safe_alloc nasm_strndup(const char *, size_t);
|
||||
*_pp = NULL; \
|
||||
} while (0)
|
||||
#define nasm_zero(p) (memset((p), 0, sizeof(*(p))))
|
||||
#define nasm_zeron(p,n) (memset((p), 0, (n)*sizeof(*(p))))
|
||||
|
||||
/*
|
||||
* Wrapper around fwrite() which fatal-errors on output failure.
|
||||
|
Loading…
Reference in New Issue
Block a user