From: Lennart Poettering Date: Thu, 3 Jan 2019 11:19:10 +0000 (+0100) Subject: json: teach json_log() the new SYNTHETIC_ERRNO() logic X-Git-Tag: v241-rc1~107^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc0f6fbffc6cb488768d8366f81cff5317acc14c;p=thirdparty%2Fsystemd.git json: teach json_log() the new SYNTHETIC_ERRNO() logic --- diff --git a/src/shared/json.c b/src/shared/json.c index 59c4617592c..01faf4037be 100644 --- a/src/shared/json.c +++ b/src/shared/json.c @@ -3140,10 +3140,7 @@ int json_log_internal( va_list ap; int r; - if (error < 0) - error = -error; - - errno = error; + errno = ERRNO_VALUE(error); va_start(ap, format); (void) vsnprintf(buffer, sizeof buffer, format, ap); diff --git a/src/shared/json.h b/src/shared/json.h index 4eba91c2720..724fb2e53f4 100644 --- a/src/shared/json.h +++ b/src/shared/json.h @@ -1,5 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ - #pragma once #include