summaryrefslogtreecommitdiffstats
path: root/libdimension/progress.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-05-05 20:09:38 -0600
committerTavian Barnes <tavianator@gmail.com>2010-05-05 22:47:44 -0600
commit6c2943e735c99579b5b861f67f2d98e5ddd6306f (patch)
treee882a1dda2726dd9dfca3fe2dd44750b17b1edda /libdimension/progress.c
parentb14506e501770aeaf54d1160c0073398cc29a038 (diff)
downloaddimension-6c2943e735c99579b5b861f67f2d98e5ddd6306f.tar.xz
Use C99 for loop initializers.
Diffstat (limited to 'libdimension/progress.c')
-rw-r--r--libdimension/progress.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdimension/progress.c b/libdimension/progress.c
index 515fd81..81cafab 100644
--- a/libdimension/progress.c
+++ b/libdimension/progress.c
@@ -108,11 +108,10 @@ dmnsn_get_progress(const dmnsn_progress *progress)
{
dmnsn_progress_element *element;
double prog = 0.0;
- unsigned int i, size;
dmnsn_progress_rdlock(progress);
- size = dmnsn_array_size(progress->elements);
- for (i = 0; i < size; ++i) {
+ size_t size = dmnsn_array_size(progress->elements);
+ for (size_t i = 0; i < size; ++i) {
element = dmnsn_array_at(progress->elements, size - i - 1);
prog += element->progress;
prog /= element->total;