socsvn commit: r254488 - soc2013/mattbw/backend/query
mattbw at FreeBSD.org
mattbw at FreeBSD.org
Tue Jul 9 10:16:38 UTC 2013
Author: mattbw
Date: Tue Jul 9 10:16:38 2013
New Revision: 254488
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254488
Log:
hopefully fix horrendously broken percentage code
Modified:
soc2013/mattbw/backend/query/core.c
Modified: soc2013/mattbw/backend/query/core.c
==============================================================================
--- soc2013/mattbw/backend/query/core.c Tue Jul 9 10:00:21 2013 (r254487)
+++ soc2013/mattbw/backend/query/core.c Tue Jul 9 10:16:38 2013 (r254488)
@@ -223,14 +223,13 @@
if (percent > 100)
percent = 100;
- scaled_percent = (((100 * q->s->position) +
- (percent * (q->s->position + 1))) / (q->s->total));
+ scaled_percent = (((100 * q->s->position) + percent) /
+ (q->s->total));
}
(void)pk_backend_set_percentage(q->backend, scaled_percent);
}
-
/*
* Checks to see if trying to do a remote package iteration with this query
* could spell disaster.
More information about the svn-soc-all
mailing list