summaryrefslogtreecommitdiffstats
path: root/src/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/defs.h')
-rw-r--r--src/defs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/defs.h b/src/defs.h
index e6f1823..1ad2d72 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -5,6 +5,17 @@
#include <stdint.h>
#include <sys/types.h>
+#define try_s(a,l) do {\
+ if(a) {\
+ goto l;\
+ }} while (0);
+
+#define try(a,l,e) do {\
+ if(a) {\
+ ret = e;\
+ goto l;\
+ }} while (0);
+
/* for array implementation */
struct entry {
uint64_t val;