diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-05-05 20:09:38 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-05-05 22:47:44 -0600 |
commit | 6c2943e735c99579b5b861f67f2d98e5ddd6306f (patch) | |
tree | e882a1dda2726dd9dfca3fe2dd44750b17b1edda /libdimension/progress.c | |
parent | b14506e501770aeaf54d1160c0073398cc29a038 (diff) | |
download | dimension-6c2943e735c99579b5b861f67f2d98e5ddd6306f.tar.xz |
Use C99 for loop initializers.
Diffstat (limited to 'libdimension/progress.c')
-rw-r--r-- | libdimension/progress.c | 5 |
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; |