diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-07 21:40:00 -0700 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-07 21:41:27 -0700 |
commit | c26f7543b2ccd006e8251be0b62a4a785ed1cc2f (patch) | |
tree | 5398904b176c8738c9056f719ddd3dc400ea6108 /sim | |
parent | 9c80f001f0d9529f14fbd6f83145c45e9218ad1e (diff) | |
download | binutils-c26f7543b2ccd006e8251be0b62a4a785ed1cc2f.zip binutils-c26f7543b2ccd006e8251be0b62a4a785ed1cc2f.tar.gz binutils-c26f7543b2ccd006e8251be0b62a4a785ed1cc2f.tar.bz2 |
sim: m32r: fix syslog call
The function returns void, not int. We only pass one argument to
syslog (the format), so use %s as the static format instead since
the emulation layer doesn't handle passing additional arguments.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/m32r/traps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c index 80c4360..51fe0d4 100644 --- a/sim/m32r/traps.c +++ b/sim/m32r/traps.c @@ -843,7 +843,8 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num) break; case TARGET_LINUX_SYS_syslog: - result = syslog (arg1, (char *) t2h_addr (cb, &s, arg2)); + syslog (arg1, "%s", (char *) t2h_addr (cb, &s, arg2)); + result = 0; errcode = errno; break; |