From: Lennart Poettering Date: Tue, 28 May 2019 13:05:53 +0000 (+0200) Subject: json: add explicit log call for ENOMEM X-Git-Tag: v245-rc1~249^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ac0787e30f0ba0b2fa370fbd87c19d62c0130c6;p=thirdparty%2Fsystemd.git json: add explicit log call for ENOMEM --- 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) \