Implement exit_if_null using variadic macros, fix compilation

This commit is contained in:
Michael Stapelberg
2009-02-15 22:52:33 +01:00
parent 57f631b7a7
commit 7216738778
3 changed files with 4 additions and 21 deletions

View File

@ -15,9 +15,10 @@
#ifndef _UTIL_H
#define _UTIL_H
#define exit_if_null(pointer, ...) { if (pointer == NULL) die(__VA_ARGS__); }
int min(int a, int b);
int max(int a, int b);
void exit_if_null(void *pointer, char *fmt, ...);
void die(char *fmt, ...);
void *smalloc(size_t size);
char *sstrdup(const char *str);