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)
This commit is contained in:
Lennart Poettering 2023-05-19 14:21:21 +02:00
parent 9287925a0d
commit b7106af465
2 changed files with 2 additions and 2 deletions

View 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);
}

View 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)