]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: voidify unchecked close_nointr calls 20371/head
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 3 Aug 2021 14:00:40 +0000 (15:00 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 3 Aug 2021 14:02:19 +0000 (15:02 +0100)
These have ignored the return value forever. Two are public APIs so
we can't really change what they return anyway, and the other one is
a cleanup path and the existing error code is more important.

CID#1461274
CID#1461275
CID#1461276

src/libsystemd/sd-login/sd-login.c
src/libsystemd/sd-network/sd-network.c
src/login/logind-session-device.c

index 3adf1cef5cf579e9c2701c877f4cf9aea7f3db90..d127443c4c0f9b8518743c91c1965b1cae1c131b 100644 (file)
@@ -999,7 +999,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
 
 _public_ sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m) {
         if (m)
-                close_nointr(MONITOR_TO_FD(m));
+                (void) close_nointr(MONITOR_TO_FD(m));
 
         return NULL;
 }
index 7273a77156a1dd3128a996bce6f3e1db73971cb1..ee93dae9e3a79965bc1331b1542285286cc9ad42 100644 (file)
@@ -444,7 +444,7 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category
 
 _public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
         if (m)
-                close_nointr(MONITOR_TO_FD(m));
+                (void) close_nointr(MONITOR_TO_FD(m));
 
         return NULL;
 }
index f2adb969d4e4119fd9a9e9d12c948f81b4b26932..1c4d543889edba318605562954d0fa2837d500e8 100644 (file)
@@ -141,7 +141,7 @@ static int session_device_open(SessionDevice *sd, bool active) {
                          * that so fail at all times and let caller retry in inactive state. */
                         r = sd_drmsetmaster(fd);
                         if (r < 0) {
-                                close_nointr(fd);
+                                (void) close_nointr(fd);
                                 return r;
                         }
                 } else