diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 06:32:28 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 06:32:28 +0000 |
commit | 7a2c503e1b6f63cf58059c4c57f2d7e24577c923 (patch) | |
tree | f4736e6edcffd0e681a8afb5ef9134a3dd21a76c /sys | |
parent | 5610a7e0684771f72529a0fe2d87f5691a85364d (diff) | |
download | FreeBSD-src-7a2c503e1b6f63cf58059c4c57f2d7e24577c923.zip FreeBSD-src-7a2c503e1b6f63cf58059c4c57f2d7e24577c923.tar.gz |
Avoid casts as lvalues. While here, avoid storing 32bit quantities in
16bit locations.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/acpica/acpi_wakeup.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/acpica/acpi_wakeup.c b/sys/i386/acpica/acpi_wakeup.c index 57e3a22..10be052 100644 --- a/sys/i386/acpica/acpi_wakeup.c +++ b/sys/i386/acpica/acpi_wakeup.c @@ -160,14 +160,14 @@ acpi_printcpu(void) } #define WAKECODE_FIXUP(offset, type, val) do { \ - void **addr; \ - addr = (void **)(sc->acpi_wakeaddr + offset); \ - (type *)*addr = val; \ + type *addr; \ + addr = (type *)(sc->acpi_wakeaddr + offset); \ + *addr = val; \ } while (0) #define WAKECODE_BCOPY(offset, type, val) do { \ - void **addr; \ - addr = (void **)(sc->acpi_wakeaddr + offset); \ + void *addr; \ + addr = (void *)(sc->acpi_wakeaddr + offset); \ bcopy(&(val), addr, sizeof(type)); \ } while (0) @@ -233,7 +233,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) WAKECODE_FIXUP(previous_ldt, uint16_t, r_ldt); WAKECODE_BCOPY(previous_idt, struct region_descriptor, r_idt); - WAKECODE_FIXUP(where_to_recover, void, acpi_restorecpu); + WAKECODE_FIXUP(where_to_recover, void *, acpi_restorecpu); WAKECODE_FIXUP(previous_ds, uint16_t, r_ds); WAKECODE_FIXUP(previous_es, uint16_t, r_es); |