[vlc-commits] Revert "update: avoid division by zero"
Jean-Baptiste Kempf
git at videolan.org
Wed Oct 21 22:58:21 CEST 2015
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 21 22:58:00 2015 +0200| [a45232aaa5e4c6dbb762a77df2b712550ac2cfce] | committer: Jean-Baptiste Kempf
Revert "update: avoid division by zero"
This reverts commit eda813bdc0d1c20980ec978e92057d01227a0cbd.
This cannot compile, sorry...
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=a45232aaa5e4c6dbb762a77df2b712550ac2cfce
---
src/misc/update.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/misc/update.c b/src/misc/update.c
index 9650313..e1257b7 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -472,7 +472,7 @@ bool update_NeedUpgrade( update_t *p_update )
* \param l_size the size in bytes
* \return the size as a string
*/
-static char *size_str( uint64_t l_size )
+static char *size_str( long int l_size )
{
char *psz_tmp = NULL;
int i_retval = 0;
@@ -527,8 +527,8 @@ static void* update_DownloadReal( void *obj )
{
update_download_thread_t *p_udt = (update_download_thread_t *)obj;
dialog_progress_bar_t *p_progress = NULL;
- uint64_t l_size;
- uint64_t l_downloaded = 0;
+ long int l_size;
+ long int l_downloaded = 0;
float f_progress;
char *psz_status;
char *psz_downloaded = NULL;
@@ -557,8 +557,7 @@ static void* update_DownloadReal( void *obj )
}
/* Get the stream size */
- if( stream_GetSize( p_stream, &l_size ) || l_size == 0 )
- goto end;
+ l_size = stream_Size( p_stream );
/* Get the file name and open it*/
psz_tmpdestfile = strrchr( p_update->release.psz_url, '/' );
More information about the vlc-commits
mailing list