feat: check for oom in string

This commit is contained in:
tilo committed 2025-11-19 20:38:43 +01:00
1 parent ecf4113621
commit 114dbc2494
4 files changed
+28 -1

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
//
// Created by tilok on 19.11.2025.
//
#ifndef TSTD_HELPER_H
#define TSTD_HELPER_H
#include <stdio.h>
#define OOM(ptr) { \
if(ptr == NULL) { \
puts("Out of memory"); \
exit(137); \
} \
}
#endif //TSTD_HELPER_H