[vlc-devel] commit: secstotimestr: use int32_t not to overflow if int exceeds 32-bits ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 20 18:44:11 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 20 19:36:16 2010 +0200| [820b4643f98b98aaaa3289c7f8f34bad7dc02e13] | committer: Rémi Denis-Courmont 

secstotimestr: use int32_t not to overflow if int exceeds 32-bits

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=820b4643f98b98aaaa3289c7f8f34bad7dc02e13
---

 include/vlc_mtime.h |    2 +-
 src/misc/mtime.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_mtime.h b/include/vlc_mtime.h
index b3df907..8d51250 100644
--- a/include/vlc_mtime.h
+++ b/include/vlc_mtime.h
@@ -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 */
 
diff --git a/src/misc/mtime.c b/src/misc/mtime.c
index 4d8a9da..e6f9da6 100644
--- a/src/misc/mtime.c
+++ b/src/misc/mtime.c
@@ -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;
 




More information about the vlc-devel mailing list