summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authormiau <miaukatzemiau@priveasy.de>2011-12-02 08:50:03 (GMT)
committermiau <miaukatzemiau@priveasy.de>2011-12-02 08:50:03 (GMT)
commitdb56c18a6188dd77f40eda1eba782770f7ef733e (patch)
treeb605322a28fab14b141c18e3f00dd6c7f1ebcc54 /src/common.h
parent6c242e521d822366238b45dae0eabdfc8f7b93f6 (diff)
add ERP error macro to catch all those errors that will never happen
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 0274856..5f24e57 100644
--- a/src/common.h
+++ b/src/common.h
@@ -14,4 +14,10 @@
#define SERVERPORT_S "4950"
#define MAXBUFLEN 100
+#define ENP(Cmd, Msg) \
+ if ((Cmd) == -1) { \
+ perror(Msg); \
+ exit(1); \
+ }
+
#endif // UDP_BROADCAST_COMMON
contact: Jan Huwald // Impressum