]> git.sesse.net Git - vlc/commitdiff
secstotimestr: use int32_t not to overflow if int exceeds 32-bits
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 20 Feb 2010 17:36:16 +0000 (19:36 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 20 Feb 2010 17:42:36 +0000 (19:42 +0200)
include/vlc_mtime.h
src/misc/mtime.c

index b3df907fa10ff8c9a95973dbad60657954f695a6..8d51250dab38177845a3c4ff2fab79e30128506c 100644 (file)
@@ -58,7 +58,7 @@ VLC_EXPORT( char *,  mstrtime, ( char *psz_buffer, mtime_t date ) );
 VLC_EXPORT( mtime_t, mdate,    ( void ) );
 VLC_EXPORT( void,    mwait,    ( mtime_t date ) );
 VLC_EXPORT( void,    msleep,   ( mtime_t delay ) );
-VLC_EXPORT( char *,  secstotimestr, ( char *psz_buffer, int secs ) );
+VLC_EXPORT( char *,  secstotimestr, ( char *psz_buffer, int32_t secs ) );
 
 # define VLC_HARD_MIN_SLEEP 10000   /* 10 milliseconds = 1 tick at 100Hz */
 
index 4d8a9da725b78780d60e954b8484a17fb05d354e..e6f9da637a47e2ca03954a633723f12ab0c38ebd 100644 (file)
@@ -125,7 +125,7 @@ char *mstrtime( char *psz_buffer, mtime_t date )
  * \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters
  * \return psz_buffer is returned so this can be used as printf parameter.
  */
-char *secstotimestr( char *psz_buffer, int i_seconds )
+char *secstotimestr( char *psz_buffer, int32_t i_seconds )
 {
     div_t d;