diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-11-03 01:19:07 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-11-04 03:32:34 +0100 |
commit | 6564918c6cc1753df906966289689fd98eb8ebcd (patch) | |
tree | f1d3b216425fff8cf9242b5b2f2fa5945e6b3de3 /src/shared/reboot-util.c | |
parent | reboot-util: drop redundant headers (diff) | |
download | systemd-6564918c6cc1753df906966289689fd98eb8ebcd.tar.xz systemd-6564918c6cc1753df906966289689fd98eb8ebcd.zip |
reboot-util: drop unnecessary cast
Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
Diffstat (limited to 'src/shared/reboot-util.c')
-rw-r--r-- | src/shared/reboot-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/reboot-util.c b/src/shared/reboot-util.c index 10d49ba63a..7fa3ff98b6 100644 --- a/src/shared/reboot-util.c +++ b/src/shared/reboot-util.c @@ -122,9 +122,9 @@ int shall_restore_state(void) { static int xen_kexec_loaded(void) { #if HAVE_XENCTRL - size_t size; _cleanup_close_ int privcmd_fd = -1, buf_fd = -1; - void *buffer; + xen_kexec_status_t *buffer; + size_t size; int r; if (access("/proc/xen", F_OK) < 0) { @@ -149,7 +149,7 @@ static int xen_kexec_loaded(void) { if (buffer == MAP_FAILED) return log_debug_errno(errno, "Cannot allocate buffer for hypercall: %m"); - *(xen_kexec_status_t*) buffer = (xen_kexec_status_t) { + *buffer = (xen_kexec_status_t) { .type = KEXEC_TYPE_DEFAULT, }; |