chiark / gitweb /
log.h: new log_oom() -> int -ENOMEM, use it
[elogind.git] / src / shutdownd / shutdownd.c
index 9dd13361331fefedf8bec03a7ecb867b620ee246..d426d9833d79359f7c340d8ea137e620b30d5e57 100644 (file)
@@ -212,10 +212,8 @@ static int update_schedule_file(struct sd_shutdown_command *c) {
         }
 
         t = cescape(c->wall_message);
-        if (!t) {
-                log_error("Out of memory.");
-                return -ENOMEM;
-        }
+        if (!t)
+                return log_oom();
 
         r = fopen_temporary("/run/systemd/shutdown/scheduled", &f, &temp_path);
         if (r < 0) {