Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/readline use snprintf
details: https://anonhg.NetBSD.org/src/rev/6561c044555d
branches: trunk
changeset: 451606:6561c044555d
user: christos <christos%NetBSD.org@localhost>
date: Wed May 29 01:37:55 2019 +0000
description:
use snprintf
diffstat:
external/gpl3/gdb/dist/readline/util.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r c0d77e92c65f -r 6561c044555d external/gpl3/gdb/dist/readline/util.c
--- a/external/gpl3/gdb/dist/readline/util.c Wed May 29 01:21:33 2019 +0000
+++ b/external/gpl3/gdb/dist/readline/util.c Wed May 29 01:37:55 2019 +0000
@@ -508,9 +508,6 @@
if (_rl_tracefp)
fclose (_rl_tracefp);
-#if 1
- snprintf (fnbuf, sizeof(fnbuf), "/var/tmp/rltrace.%ld", (long)getpid());
-#else
#if defined (_WIN32) && !defined (__CYGWIN__)
/* Windows doesn't have /var/tmp, so open the trace file in the
user's temporary directory instead. */
@@ -520,7 +517,7 @@
: "."),
getpid ());
#else
- sprintf (fnbuf, "/var/tmp/rltrace.%ld", (long) getpid ());
+ snprintf (fnbuf, sizeof(fnbuf), "/var/tmp/rltrace.%ld", (long)getpid());
#endif
unlink (fnbuf);
_rl_tracefp = fopen (fnbuf, "w+");
Home |
Main Index |
Thread Index |
Old Index