! malloc_orDie() : * Allocate memory. * * @return If successful this function returns a pointer to allo- * cated memory. If there is an error, this function will send that * error to stderr and exit. */
| 160 | * error to stderr and exit. |
| 161 | */ |
| 162 | static void* malloc_orDie(size_t size) |
| 163 | { |
| 164 | void* const buff = malloc(size); |
| 165 | if (buff) return buff; |
| 166 | /* error */ |
| 167 | perror("malloc"); |
| 168 | exit(ERROR_malloc); |
| 169 | } |
| 170 | |
| 171 | /*! loadFile_orDie() : |
| 172 | * load file into buffer (memory). |
no test coverage detected