Macros BURN_ALLOC_MEM, BURN_FREE_MEM for replaceing local variables

1.1.0
Thomas Schmitt 12 years ago
parent 7af151169d
commit 95e511b984
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 15
      libburn/init.h

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

@ -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 */

Loading…
Cancel
Save