From: Lennart Poettering Date: Mon, 25 Sep 2017 18:26:47 +0000 (+0200) Subject: log: let's make use of the fact that our functions return the negative error code... X-Git-Tag: v235.1~75 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=817ce9d4ab8a8f3b0362b4ccdb46c14d669c8a18;p=elogind.git log: let's make use of the fact that our functions return the negative error code for log_oom() too --- diff --git a/src/basic/log.c b/src/basic/log.c index 0581be58c..d34d51847 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -850,9 +850,8 @@ void log_assert_failed_return_realm( } int log_oom_internal(LogRealm realm, const char *file, int line, const char *func) { - log_internal_realm(LOG_REALM_PLUS_LEVEL(realm, LOG_ERR), - ENOMEM, file, line, func, "Out of memory."); - return -ENOMEM; + return log_internal_realm(LOG_REALM_PLUS_LEVEL(realm, LOG_ERR), + ENOMEM, file, line, func, "Out of memory."); } int log_format_iovec(