projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba4da8c
)
introduce enum for generic return values
author
Christian Grothoff
<christian@grothoff.org>
Wed, 8 Apr 2020 18:30:05 +0000
(20:30 +0200)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 8 Apr 2020 18:30:05 +0000
(20:30 +0200)
src/include/gnunet_common.h
patch
|
blob
|
history
diff --git
a/src/include/gnunet_common.h
b/src/include/gnunet_common.h
index d84f9d77e3532ba38533361410931c4d692aba5b..212c78f5475296985c1294a3ad6f8a9643e5ea04 100644
(file)
--- 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))