gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: use better return type


From: gnunet
Subject: [gnunet] branch master updated: use better return type
Date: Mon, 27 Jul 2020 11:56:24 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 740355cd6 use better return type
740355cd6 is described below

commit 740355cd63dcd248d7cfd75129dc67e7667ecfe9
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 27 11:50:21 2020 +0200

    use better return type
---
 src/include/gnunet_common.h   | 38 +++++++++++++++++++-------------------
 src/include/gnunet_json_lib.h |  2 +-
 src/json/json.c               |  2 +-
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 91d4a5bd4..b2f99cd55 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -457,11 +457,11 @@ __attribute__ ((format (printf, 2, 3)));
   __extension__ ({                  \
     int _gnunet_boolean_var_;      \
     if (expr)                      \
-    _gnunet_boolean_var_ = 1;    \
+      _gnunet_boolean_var_ = 1;    \
     else                           \
-    _gnunet_boolean_var_ = 0;    \
+      _gnunet_boolean_var_ = 0;    \
     _gnunet_boolean_var_;          \
-    })
+  })
 #define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1))
 #define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0))
 #else
@@ -499,12 +499,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
         ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0))                        \
     {                                                                     \
       if (GN_UNLIKELY (log_call_enabled == -1))                           \
-      log_call_enabled =                                                \
-        GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
-                                    (comp),                             \
-                                    __FILE__,                           \
-                                    __FUNCTION__,                       \
-                                    __LINE__);                          \
+        log_call_enabled =                                                \
+          GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
+                                      (comp),                             \
+                                      __FILE__,                           \
+                                      __FUNCTION__,                       \
+                                      __LINE__);                          \
       if (GN_UNLIKELY (GNUNET_get_log_skip () > 0))                       \
       {                                                                   \
         GNUNET_log_skip (-1, GNUNET_NO);                                  \
@@ -512,7 +512,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
       else                                                                \
       {                                                                   \
         if (GN_UNLIKELY (log_call_enabled))                               \
-        GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__);            \
+          GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__);            \
       }                                                                   \
     }                                                                     \
   } while (0)
@@ -525,12 +525,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
         ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0))                        \
     {                                                                     \
       if (GN_UNLIKELY (log_call_enabled == -1))                           \
-      log_call_enabled =                                                \
-        GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
-                                    NULL,                               \
-                                    __FILE__,                           \
-                                    __FUNCTION__,                       \
-                                    __LINE__);                          \
+        log_call_enabled =                                                \
+          GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \
+                                      NULL,                               \
+                                      __FILE__,                           \
+                                      __FUNCTION__,                       \
+                                      __LINE__);                          \
       if (GN_UNLIKELY (GNUNET_get_log_skip () > 0))                       \
       {                                                                   \
         GNUNET_log_skip (-1, GNUNET_NO);                                  \
@@ -538,7 +538,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
       else                                                                \
       {                                                                   \
         if (GN_UNLIKELY (log_call_enabled))                               \
-        GNUNET_log_nocheck ((kind), __VA_ARGS__);                       \
+          GNUNET_log_nocheck ((kind), __VA_ARGS__);                       \
       }                                                                   \
     }                                                                     \
   } while (0)
@@ -1319,8 +1319,8 @@ GNUNET_is_zero_ (const void *a,
  *     been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or 
#GNUNET_array_grow earlier.  NULL is allowed.
  */
 #define GNUNET_free(ptr) do { \
-  GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
-  ptr = NULL; \
+    GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
+    ptr = NULL; \
 } while (0)
 
 
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h
index 95d136239..07a14d329 100644
--- a/src/include/gnunet_json_lib.h
+++ b/src/include/gnunet_json_lib.h
@@ -127,7 +127,7 @@ struct GNUNET_JSON_Specification
  * @param[out] which index into @a spec did we encounter an error
  * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
  */
-int
+enum GNUNET_GenericReturnValue
 GNUNET_JSON_parse (const json_t *root,
                    struct GNUNET_JSON_Specification *spec,
                    const char **error_json_name,
diff --git a/src/json/json.c b/src/json/json.c
index f6d2406c4..0631c51bb 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -41,7 +41,7 @@
  * @param[out] which index into @a spec did we encounter an error
  * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
  */
-int
+enum GNUNET_GenericReturnValue
 GNUNET_JSON_parse (const json_t *root,
                    struct GNUNET_JSON_Specification *spec,
                    const char **error_json_name,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]