You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2011/04/06 22:59:47 UTC

svn commit: r1089624 - /httpd/httpd/trunk/server/mpm/winnt/service.c

Author: trawick
Date: Wed Apr  6 20:59:47 2011
New Revision: 1089624

URL: http://svn.apache.org/viewvc?rev=1089624&view=rev
Log:
can't format time_t with %d; cast this small interval time to int

Modified:
    httpd/httpd/trunk/server/mpm/winnt/service.c

Modified: httpd/httpd/trunk/server/mpm/winnt/service.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/service.c?rev=1089624&r1=1089623&r2=1089624&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/service.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/service.c Wed Apr  6 20:59:47 2011
@@ -149,7 +149,8 @@ void hold_console_open_on_error(void)
                 return;
         }
         remains = ((start + 30) - time(NULL));
-        sprintf (count, "%d...", remains);
+        sprintf(count, "%d...",
+                (int)remains); /* 30 or less, so can't overflow int */
         if (!SetConsoleCursorPosition(hConErr, coninfo.dwCursorPosition))
             return;
         if (!WriteConsole(hConErr, count, (DWORD)strlen(count), &result, NULL)