diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-04-24 14:02:07 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-14 01:23:06 -0400 |
commit | 64654371d6324794d11131fc95c1bc4caaaf173d (patch) | |
tree | 95a743743948415e76aba391cecc4fa68746a943 /sim | |
parent | 7fb6dc36bb515f39f332707b85f7e1cb5129eed8 (diff) | |
download | fsf-binutils-gdb-64654371d6324794d11131fc95c1bc4caaaf173d.zip fsf-binutils-gdb-64654371d6324794d11131fc95c1bc4caaaf173d.tar.gz fsf-binutils-gdb-64654371d6324794d11131fc95c1bc4caaaf173d.tar.bz2 |
sim: callback: inline PTR define
We require C11 now, so no need for these pre-ANSI C hacks.
PTR is simply void*, so use that directly.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/callback.c | 2 | ||||
-rw-r--r-- | sim/common/sim-syscall.c | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index fb0f8a8..ac80464 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2021-05-14 Mike Frysinger <vapier@gentoo.org> + * callback.c (cb_host_to_target_stat): Change PTR to void*. + * sim-syscall.c (sim_syscall_multi): Delete (PTR) casts. + +2021-05-14 Mike Frysinger <vapier@gentoo.org> + * Make-common.in (callback_h, remote_sim_h): Update path. * callback.c: Update include path. * gentmap.c (gen_targ_map_c): Likewise. diff --git a/sim/common/callback.c b/sim/common/callback.c index 9e6d456..1b53823 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -946,7 +946,7 @@ cb_store_target_endian (host_callback *cb, char *p, int size, long val) or zero if an error occurred during the translation. */ int -cb_host_to_target_stat (host_callback *cb, const struct stat *hs, PTR ts) +cb_host_to_target_stat (host_callback *cb, const struct stat *hs, void *ts) { const char *m = cb->stat_map; char *p; diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c index e91453d..9dbc71a 100644 --- a/sim/common/sim-syscall.c +++ b/sim/common/sim-syscall.c @@ -71,8 +71,8 @@ sim_syscall_multi (SIM_CPU *cpu, int func, long arg1, long arg2, long arg3, sc.arg3 = arg3; sc.arg4 = arg4; - sc.p1 = (PTR) sd; - sc.p2 = (PTR) cpu; + sc.p1 = sd; + sc.p2 = cpu; sc.read_mem = sim_syscall_read_mem; sc.write_mem = sim_syscall_write_mem; |