Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/acpica/dist/include Replace null pointer ar...



details:   https://anonhg.NetBSD.org/src/rev/12e5d9f99e5d
branches:  trunk
changeset: 319281:12e5d9f99e5d
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed May 23 21:16:57 2018 +0000

description:
Replace null pointer arithmethic with direct cast

diffstat:

 sys/external/bsd/acpica/dist/include/actypes.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 7afe874cad62 -r 12e5d9f99e5d sys/external/bsd/acpica/dist/include/actypes.h
--- a/sys/external/bsd/acpica/dist/include/actypes.h    Wed May 23 18:40:29 2018 +0000
+++ b/sys/external/bsd/acpica/dist/include/actypes.h    Wed May 23 21:16:57 2018 +0000
@@ -550,8 +550,8 @@
 
 /* Pointer/Integer type conversions */
 
-#define ACPI_TO_POINTER(i)              ACPI_ADD_PTR (void, (void *) 0, (ACPI_SIZE) (i))
-#define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) 0)
+#define ACPI_TO_POINTER(i)              ((void *)((uintptr_t)(ACPI_SIZE) (i)))
+#define ACPI_TO_INTEGER(p)              ((uintptr_t)(p))
 #define ACPI_OFFSET(d, f)               ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
 #define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
 #define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)



Home | Main Index | Thread Index | Old Index