aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 20:30:05 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 20:30:05 +0200
commitccfb2c2e6c71bbadf3f7f74b19b4c4128a1a09b6 (patch)
treee6eece4808a80b92c0ca1ad5002ee0505f4fe57e /src/include
parentba4da8c3f22977b33028988a7f65596005ce3f55 (diff)
downloadgnunet-ccfb2c2e6c71bbadf3f7f74b19b4c4128a1a09b6.tar.gz
gnunet-ccfb2c2e6c71bbadf3f7f74b19b4c4128a1a09b6.zip
introduce enum for generic return values
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_common.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index d84f9d77e..212c78f54 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -80,10 +80,15 @@ extern "C" {
80 * GNUNET_SYSERR`, `GNUNET_OK != GNUNET_NO`, `GNUNET_NO != 80 * GNUNET_SYSERR`, `GNUNET_OK != GNUNET_NO`, `GNUNET_NO !=
81 * GNUNET_SYSERR` and finally `GNUNET_YES != GNUNET_NO`. 81 * GNUNET_SYSERR` and finally `GNUNET_YES != GNUNET_NO`.
82 */ 82 */
83#define GNUNET_OK 1 83enum GNUNET_GenericReturnValue
84#define GNUNET_SYSERR -1 84{
85#define GNUNET_YES 1 85 GNUNET_SYSERR = -1,
86#define GNUNET_NO 0 86 GNUNET_NO = 0,
87 GNUNET_OK = 1,
88 /* intentionally identical to #GNUNET_OK! */
89 GNUNET_YES = 1,
90};
91
87 92
88#define GNUNET_MIN(a, b) (((a) < (b)) ? (a) : (b)) 93#define GNUNET_MIN(a, b) (((a) < (b)) ? (a) : (b))
89 94