aboutsummaryrefslogtreecommitdiffstats
path: root/service/src/util.h
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2021-06-24 21:23:02 +0200
committerLouis Burda <quent.burda@gmail.com>2021-06-24 21:23:02 +0200
commit14bc8a3883663656cd4254567a978002c062992d (patch)
tree66f2c72f026c0142d9f0e74d272af5ed4b4863bb /service/src/util.h
parent5569ec2abd2c8f31554a02587fda842e4da7eba3 (diff)
downloadenowars5-service-stldoctor-14bc8a3883663656cd4254567a978002c062992d.tar.gz
enowars5-service-stldoctor-14bc8a3883663656cd4254567a978002c062992d.zip
refactored code for readability and keeping within 80ch limit, updated service source
Diffstat (limited to 'service/src/util.h')
-rw-r--r--service/src/util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/service/src/util.h b/service/src/util.h
index 7b6eed0..d15fefa 100644
--- a/service/src/util.h
+++ b/service/src/util.h
@@ -11,7 +11,10 @@
#define MIN(x,y) ((x) > (y) ? (y) : (x))
#define MAX(x,y) ((x) < (y) ? (y) : (x))
-#define NULLFREE(p) do { free(p); p = NULL; } while (0)
+#define ERR(...) printf("ERR: " __VA_ARGS__)
+
+#define NFREE(p) do { free(p); p = NULL; } while (0)
+#define NFCLOSE(f) do { fclose(f); f = NULL; } while (0)
#define MHASHLEN 40