[MPlayer-cvslog] r25652 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Tue Jan 8 23:18:36 CET 2008


Author: reimar
Date: Tue Jan  8 23:18:35 2008
New Revision: 25652

Log:
Simplify a needlessly complex use of snprintf


Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Jan  8 23:18:35 2008
@@ -781,8 +781,7 @@ static void exit_sighandler(int x){
       if (crash_debug) {
         int gdb_pid;
         char spid[20];
-        snprintf(spid, 19, "%i", getpid());
-        spid[19] = 0;
+        snprintf(spid, sizeof(spid), "%i", getpid());
         mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forking...\n");
         gdb_pid = fork();
         mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");



More information about the MPlayer-cvslog mailing list