]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: remove (void) cast around sync()
authorLennart Poettering <lennart@poettering.net>
Fri, 19 May 2023 12:21:21 +0000 (14:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 May 2023 12:21:21 +0000 (14:21 +0200)
The call is void anyway, it doesn't return an failure indication. Hence,
no need to cast void to (void)...

(We got this right in most cases, but forgot some)

src/basic/async.c
src/systemctl/systemctl-util.c

index 73de889a2b0de2eaf47788c42b79e62e295f080f..5e347dde8b00aa4d8347acdb88750e5c49a150da 100644 (file)
@@ -72,7 +72,7 @@ int asynchronous_sync(pid_t *ret_pid) {
                 return r;
         if (r == 0) {
                 /* Child process */
-                (void) sync();
+                sync();
                 _exit(EXIT_SUCCESS);
         }
 
index b6b28a113d85dc95150a5d5c5b656ce30fc5721f..074bb8d83be87be654178b04ab55928fe2851072 100644 (file)
@@ -921,7 +921,7 @@ int halt_now(enum action a) {
         /* The kernel will automatically flush ATA disks and suchlike on reboot(), but the file systems need
          * to be synced explicitly in advance. */
         if (!arg_no_sync && !arg_dry_run)
-                (void) sync();
+                sync();
 
         /* Make sure C-A-D is handled by the kernel from this point on... */
         if (!arg_dry_run)