home · contact · privacy
Client: Fix horizontal wobbliness of auto-centering on player.
[plomrogue] / src / common / try_malloc.c
1 /* src/common/try_malloc.c */
2
3 #include "try_malloc.h"
4 #include <stdlib.h> /* for malloc */
5 #include <sys/types.h> /* for size_t */
6 #include "rexit.h" /* for exit_trouble() */
7
8
9
10 extern void * try_malloc(size_t size, char * f)
11 {
12     void * p = malloc(size);
13     exit_trouble(NULL == p, f, "malloc()");
14     return p;
15 }