aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common.h b/src/common.h
index 1401c37..68d465e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,5 +1,5 @@
/**
- * Copyright © 2015 Mattias Andrée <maandree@member.fsf.org>
+ * Copyright © 2015, 2016 Mattias Andrée <maandree@member.fsf.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -35,12 +35,12 @@
*
* @param ... The statement.
*/
-# ifdef DEBUG
+# ifndef DEBUG
+# define t(...) do { if (__VA_ARGS__) goto fail; } while (0)
+# else
# define t(...) do { if ((__VA_ARGS__) ? (failed__ = #__VA_ARGS__) : 0) { (perror)(failed__); goto fail; } } while (0)
static const char *failed__ = NULL;
# define perror(_) ((void)(_))
-# else
-# define t(...) do { if (__VA_ARGS__) goto fail; } while (0)
# endif
#endif