]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: voidify sd_notify() calls 12062/head
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Mar 2019 15:32:31 +0000 (16:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Mar 2019 15:32:46 +0000 (16:32 +0100)
src/nspawn/nspawn.c

index c8a7226de0b2cb2668432cba9d565180b7dfc429..11620c2a669b7437af842f98de5ed54e062453a0 100644 (file)
@@ -3616,11 +3616,11 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r
                 return log_oom();
 
         if (strv_find(tags, "READY=1"))
-                sd_notifyf(false, "READY=1\n");
+                (void) sd_notifyf(false, "READY=1\n");
 
         p = strv_find_startswith(tags, "STATUS=");
         if (p)
-                sd_notifyf(false, "STATUS=Container running: %s", p);
+                (void) sd_notifyf(false, "STATUS=Container running: %s", p);
 
         return 0;
 }
@@ -4472,9 +4472,9 @@ static int run_container(int master,
          * will make them appear in getpwuid(), thus we can release the /etc/passwd lock. */
         etc_passwd_lock = safe_close(etc_passwd_lock);
 
-        sd_notifyf(false,
-                   "STATUS=Container running.\n"
-                   "X_NSPAWN_LEADER_PID=" PID_FMT, *pid);
+        (void) sd_notifyf(false,
+                          "STATUS=Container running.\n"
+                          "X_NSPAWN_LEADER_PID=" PID_FMT, *pid);
         if (!arg_notify_ready)
                 (void) sd_notify(false, "READY=1\n");
 
@@ -5010,9 +5010,9 @@ static int run(int argc, char *argv[]) {
         }
 
 finish:
-        sd_notify(false,
-                  r == 0 && ret == EXIT_FORCE_RESTART ? "STOPPING=1\nSTATUS=Restarting..." :
-                                                        "STOPPING=1\nSTATUS=Terminating...");
+        (void) sd_notify(false,
+                         r == 0 && ret == EXIT_FORCE_RESTART ? "STOPPING=1\nSTATUS=Restarting..." :
+                                                               "STOPPING=1\nSTATUS=Terminating...");
 
         if (pid > 0)
                 (void) kill(pid, SIGKILL);