From 5bf6e961d428a3ad2b4c7e60698bc31d50eea13f Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 19 Feb 2011 13:25:27 +0000 Subject: [PATCH] Avoid another couple of type casts --- src/download.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/download.c b/src/download.c index 1878eb8..db65177 100644 --- a/src/download.c +++ b/src/download.c @@ -373,8 +373,8 @@ static void _download_refresh(Download * download) snprintf(buf, sizeof(buf), _("%.1f of %.1f %s"), rate, fraction, _(unit)); gtk_label_set_text(GTK_LABEL(download->done), buf); - fraction = (double)download->data_received - / (double)download->content_length; + fraction = download->data_received; + fraction /= download->content_length; snprintf(buf, sizeof(buf), "%.1f%%", fraction * 100); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR( download->progress), fraction);