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 3555bcc2f5c007f19b5d86b7a31ca250cb3359ff..10a9df09613b981031d22c933d870b3aac2294dd 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 78753bca495895b6f0a9ddbcec1cbd55fcd4b33c..23fb55a9d4b232c224d82ce68efd0f6637e5eb5c 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);