From 0ac0787e30f0ba0b2fa370fbd87c19d62c0130c6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 May 2019 15:05:53 +0200 Subject: [PATCH] json: add explicit log call for ENOMEM --- src/shared/json.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/json.h b/src/shared/json.h index abcf17e86de..40e74e03a48 100644 --- a/src/shared/json.h +++ b/src/shared/json.h @@ -311,6 +311,9 @@ int json_log_internal(JsonVariant *variant, int level, int error, const char *fi : -ERRNO_VALUE(_e); \ }) +#define json_log_oom(variant, flags) \ + json_log(variant, flags, SYNTHETIC_ERRNO(ENOMEM), "Out of memory.") + #define JSON_VARIANT_STRING_CONST(x) _JSON_VARIANT_STRING_CONST(UNIQ, (x)) #define _JSON_VARIANT_STRING_CONST(xq, x) \ -- 2.47.3