diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-10-26 21:53:30 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-10-31 21:24:39 +0545 |
commit | 5b94c3808140206d3b5204a3780f294d590cc458 (patch) | |
tree | 4b5bea9bdc30a6ab503bd3d1c289b5e6f20af836 /sim/v850 | |
parent | f2462532e24ebfc137598d73ee6541948121f040 (diff) | |
download | binutils-5b94c3808140206d3b5204a3780f294d590cc458.zip binutils-5b94c3808140206d3b5204a3780f294d590cc458.tar.gz binutils-5b94c3808140206d3b5204a3780f294d590cc458.tar.bz2 |
sim: common: change sim_read & sim_write to use void* buffers
When reading/writing arbitrary data to the system's memory, the unsigned
char pointer type doesn't make that much sense. Switch it to void so we
align a bit with standard C library read/write functions, and to avoid
having to sprinkle casts everywhere.
Diffstat (limited to 'sim/v850')
-rw-r--r-- | sim/v850/simops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/v850/simops.c b/sim/v850/simops.c index f90a0f7..573ece5 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -398,7 +398,7 @@ fetch_str (SIM_DESC sd, address_word addr) nr++; buf = NZALLOC (char, nr + 1); - sim_read (simulator, addr, (unsigned char *) buf, nr); + sim_read (simulator, addr, buf, nr); return buf; } @@ -1692,7 +1692,7 @@ OP_10007E0 (void) { char *buf = zalloc (PARM3); RETVAL = sim_io_read (simulator, PARM1, buf, PARM3); - sim_write (simulator, PARM2, (unsigned char *) buf, PARM3); + sim_write (simulator, PARM2, buf, PARM3); free (buf); if ((int) RETVAL < 0) RETERR = sim_io_get_errno (simulator); @@ -1702,7 +1702,7 @@ OP_10007E0 (void) case TARGET_NEWLIB_V850_SYS_write: { char *buf = zalloc (PARM3); - sim_read (simulator, PARM2, (unsigned char *) buf, PARM3); + sim_read (simulator, PARM2, buf, PARM3); if (PARM1 == 1) RETVAL = sim_io_write_stdout (simulator, buf, PARM3); else |