log: let's make use of the fact that our functions return the negative error code...
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Sep 2017 18:26:47 +0000 (20:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Sep 2017 15:46:33 +0000 (17:46 +0200)
src/basic/log.c

index 168c6c3..59bc16f 100644 (file)
@@ -834,9 +834,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(