ddb(4): db_read_bytes/db_write_bytes: change dst/src parameter to void*
authorcheloha <cheloha@openbsd.org>
Fri, 23 Feb 2024 18:19:02 +0000 (18:19 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 23 Feb 2024 18:19:02 +0000 (18:19 +0000)
commitfe1fe620f8418f588086cadfe1b03bb5d224b548
tree99f14322652534c66896fdc17fe6587c21aa85f0
parent0a34672fd384e2c7c09aeaf1c08e7ad09e7b90a5
ddb(4): db_read_bytes/db_write_bytes: change dst/src parameter to void*

Almost all db_read_bytes() callers cast the destination buffer
argument to char*, which suggests the API's prototype is incompatible
with how the API is actually used.

Change db_read_bytes() and db_write_bytes() to take a void* as the
destination/source buffer parameter so callers don't need to cast the
argument.

With input from bluhm@.  Bugs caught by Clemens Gossnitzer (ASCII
approximation of name).

Thread: https://marc.info/?l=openbsd-tech&m=170740813021636&w=2

ok bluhm@
14 files changed:
sys/arch/alpha/alpha/db_interface.c
sys/arch/amd64/amd64/db_memrw.c
sys/arch/arm/arm/db_interface.c
sys/arch/arm64/arm64/db_interface.c
sys/arch/hppa/hppa/db_interface.c
sys/arch/i386/i386/db_memrw.c
sys/arch/m88k/m88k/db_interface.c
sys/arch/mips64/mips64/db_machdep.c
sys/arch/powerpc/ddb/db_memrw.c
sys/arch/powerpc64/powerpc64/db_memrw.c
sys/arch/riscv64/riscv64/db_interface.c
sys/arch/sh/sh/db_memrw.c
sys/arch/sparc64/sparc64/db_interface.c
sys/ddb/db_access.h