Macros BURN_ALLOC_MEM, BURN_FREE_MEM for replaceing local variables
This commit is contained in:
parent
7af151169d
commit
95e511b984
@ -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…
Reference in New Issue
Block a user