summaryrefslogtreecommitdiff
path: root/src/shared/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/json.h')
-rw-r--r--src/shared/json.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/json.h b/src/shared/json.h
index f8e035cda1..023f08d121 100644
--- a/src/shared/json.h
+++ b/src/shared/json.h
@@ -264,12 +264,12 @@ static inline int json_dispatch_level(JsonDispatchFlags flags) {
int json_log_internal(JsonVariant *variant, int level, int error, const char *file, int line, const char *func, const char *format, ...) _printf_(7, 8);
-#define json_log(variant, flags, error, ...) \
+#define json_log(variant, flags, error, ...) \
({ \
- int _level = json_dispatch_level(flags), _e = (error); \
+ int _level = json_dispatch_level(flags), _e = (error); \
(log_get_max_level() >= LOG_PRI(_level)) \
? json_log_internal(variant, _level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
- : -abs(_e); \
+ : -ERRNO_VALUE(_e); \
})
#define JSON_VARIANT_STRING_CONST(x) _JSON_VARIANT_STRING_CONST(UNIQ, (x))