From: Lennart Poettering Date: Fri, 19 May 2023 12:21:21 +0000 (+0200) Subject: tree-wide: remove (void) cast around sync() X-Git-Tag: v254-rc1~438^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7106af465f1d7fbe4a6695f5b7f7eb8c109d622;p=thirdparty%2Fsystemd.git tree-wide: remove (void) cast around sync() 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) --- diff --git a/src/basic/async.c b/src/basic/async.c index 73de889a2b0..5e347dde8b0 100644 --- a/src/basic/async.c +++ b/src/basic/async.c @@ -72,7 +72,7 @@ int asynchronous_sync(pid_t *ret_pid) { return r; if (r == 0) { /* Child process */ - (void) sync(); + sync(); _exit(EXIT_SUCCESS); } diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c index b6b28a113d8..074bb8d83be 100644 --- a/src/systemctl/systemctl-util.c +++ b/src/systemctl/systemctl-util.c @@ -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)