mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
sys.h:
define SYS_CHECKMEM macro to ease memory allocation failure detection cmd.c: loads of whitespace
This commit is contained in:
parent
388ff7b597
commit
6f1b68aeb4
2 changed files with 433 additions and 370 deletions
|
@ -89,4 +89,10 @@ void Sys_PageIn (void *ptr, int size);
|
||||||
//
|
//
|
||||||
void Sys_DebugLog(const char *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
void Sys_DebugLog(const char *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||||
|
|
||||||
|
#define SYS_CHECKMEM(x) \
|
||||||
|
do { \
|
||||||
|
if (!(x)) \
|
||||||
|
Sys_Error ("%s: Failed to reallocate memory.", __func__); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#endif // __sys_h
|
#endif // __sys_h
|
||||||
|
|
693
libs/util/cmd.c
693
libs/util/cmd.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue