public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: m32r: fix syslog call
@ 2023-12-08  4:42 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-12-08  4:42 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c26f7543b2ccd006e8251be0b62a4a785ed1cc2f

commit c26f7543b2ccd006e8251be0b62a4a785ed1cc2f
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Dec 7 21:40:00 2023 -0700

    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.

Diff:
---
 sim/m32r/traps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c
index 80c4360235b..51fe0d484a5 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-08  4:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08  4:42 [binutils-gdb] sim: m32r: fix syslog call Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).