]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: voidify reboot() invocations
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Feb 2018 16:46:55 +0000 (17:46 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 Feb 2018 09:42:06 +0000 (10:42 +0100)
We use (void) in most cases for reboot() already, let's add it to the
others as well.

src/core/emergency-action.c
src/core/shutdown.c

index 095033732b19b1ef022ee815923ffcc1fbc8ee70..be3ca8f20d1c799341a0c9de37cba25d5c2c9fdd 100644 (file)
@@ -93,7 +93,7 @@ int emergency_action(
                 }
 
                 log_info("Rebooting.");
-                reboot(RB_AUTOBOOT);
+                (void) reboot(RB_AUTOBOOT);
                 break;
 
         case EMERGENCY_ACTION_POWEROFF:
@@ -112,7 +112,7 @@ int emergency_action(
                 sync();
 
                 log_info("Powering off.");
-                reboot(RB_POWER_OFF);
+                (void) reboot(RB_POWER_OFF);
                 break;
 
         default:
index 8907c4b0a36cda516d63c1f2c0b0502b245ca7a7..33751c5ff55ccc9b8b4859eeaffd30fcc69c1bff 100644 (file)
@@ -548,7 +548,7 @@ int main(int argc, char *argv[]) {
                 assert_not_reached("Unknown magic");
         }
 
-        reboot(cmd);
+        (void) reboot(cmd);
         if (errno == EPERM && in_container) {
                 /* If we are in a container, and we lacked
                  * CAP_SYS_BOOT just exit, this will kill our