From: Christian Grothoff Date: Wed, 8 Apr 2020 18:30:05 +0000 (+0200) Subject: introduce enum for generic return values X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ccfb2c2e6c71bbadf3f7f74b19b4c4128a1a09b6;p=oweals%2Fgnunet.git introduce enum for generic return values --- 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" { * GNUNET_SYSERR`, `GNUNET_OK != GNUNET_NO`, `GNUNET_NO != * GNUNET_SYSERR` and finally `GNUNET_YES != GNUNET_NO`. */ -#define GNUNET_OK 1 -#define GNUNET_SYSERR -1 -#define GNUNET_YES 1 -#define GNUNET_NO 0 +enum GNUNET_GenericReturnValue +{ + GNUNET_SYSERR = -1, + GNUNET_NO = 0, + GNUNET_OK = 1, + /* intentionally identical to #GNUNET_OK! */ + GNUNET_YES = 1, +}; + #define GNUNET_MIN(a, b) (((a) < (b)) ? (a) : (b))