using asprintf

This commit is contained in:
Devaev Maxim
2021-03-25 14:23:43 +03:00
parent 749bc5caf7
commit 1d3b428a75
6 changed files with 10 additions and 19 deletions

View File

@@ -39,6 +39,8 @@
#define A_REALLOC(_dest, _nmemb) assert((_dest = realloc(_dest, _nmemb * sizeof(*(_dest)))))
#define MEMSET_ZERO(_obj) memset(&(_obj), 0, sizeof(_obj))
#define A_ASPRINTF(_dest, _fmt, ...) assert(asprintf(&(_dest), _fmt, ##__VA_ARGS__) >= 0)
#define ARRAY_LEN(_array) (sizeof(_array) / sizeof(_array[0]))
#define INLINE inline __attribute__((always_inline))