use snprintf and cast to long.

This commit is contained in:
christos 2015-08-20 17:25:50 +00:00
parent 71859f7093
commit ed5ec7e8c7
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ _rl_tropen ()
if (_rl_tracefp)
fclose (_rl_tracefp);
sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid());
snprintf (fnbuf, sizeof(fnbuf), "/var/tmp/rltrace.%ld", (long)getpid());
unlink(fnbuf);
_rl_tracefp = fopen (fnbuf, "w+");
return _rl_tracefp != 0;