chiark / gitweb /
logind: prefix some calls to unlink with (void)
authorDaniel Mack <daniel@zonque.org>
Wed, 27 May 2015 13:20:58 +0000 (15:20 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:12 +0000 (10:01 +0100)
Make Coverity happy and tell it we're not interested in the return
value of these two calls.

src/login/logind-dbus.c
src/login/logind.c

index 3555bcc..10a9df0 100644 (file)
@@ -1965,7 +1965,7 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
         m->scheduled_shutdown_timeout = 0;
 
         if (m->unlink_nologin) {
-                unlink("/run/nologin");
+                (void) unlink("/run/nologin");
                 m->unlink_nologin = false;
         }
 
index 78753bc..23fb55a 100644 (file)
@@ -170,7 +170,7 @@ static void manager_free(Manager *m) {
                 udev_unref(m->udev);
 
         if (m->unlink_nologin)
-                unlink("/run/nologin");
+                (void) unlink("/run/nologin");
 
         bus_verify_polkit_async_registry_free(m->polkit_registry);