Macros BURN_ALLOC_MEM, BURN_FREE_MEM for replaceing local variables

This commit is contained in:
Thomas Schmitt 2011-05-15 10:47:01 +00:00
parent 7af151169d
commit 95e511b984
2 changed files with 16 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2011.05.12.135217"
#define Cdrskin_timestamP "2011.05.15.104727"

View File

@ -28,4 +28,19 @@ extern volatile int burn_builtin_triggered_action; /* burn_is_aborting() */
int burn_init_catch_on_abort(int flag);
#define BURN_ALLOC_MEM(pt, typ, anz) { \
pt= (typ *) calloc(1, (anz)*sizeof(typ)); \
if(pt == NULL) { \
libdax_msgs_submit(libdax_messenger, -1, 0x00000003, \
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH, \
"Out of virtual memory", 0, 0); \
goto ex; \
} }
#define BURN_FREE_MEM(pt) { \
if(pt != NULL) \
free(pt); \
}
#endif /* BURN__INIT_H */