diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-03-13 08:23:56 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-13 08:23:56 +0000 |
commit | f76a88011a993d059beafe090a21a20be1cb9f4d (patch) | |
tree | 4fb7d5802ec2dc03912660a041a1b3166c1a8a2d /fish/progress.c | |
parent | 14df5fa5d1731a502332e9d4a41f54ee3d4a4dac (diff) | |
download | libguestfs-f76a88011a993d059beafe090a21a20be1cb9f4d.tar.gz libguestfs-f76a88011a993d059beafe090a21a20be1cb9f4d.tar.xz libguestfs-f76a88011a993d059beafe090a21a20be1cb9f4d.zip |
Replace 'int' with 'size_t' passim.
Analyze all uses of 'int' in the code, and replace with 'size_t' where
appropriate.
Diffstat (limited to 'fish/progress.c')
-rw-r--r-- | fish/progress.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fish/progress.c b/fish/progress.c index 6c30e952..c296f40c 100644 --- a/fish/progress.c +++ b/fish/progress.c @@ -88,7 +88,7 @@ rmsd_get_standard_deviation (const struct rmsd *r) struct progress_bar { double start; /* start time of command */ - int count; /* number of progress notifications per cmd */ + size_t count; /* number of progress notifications per cmd */ struct rmsd rmsd; /* running mean and standard deviation */ int have_terminfo; int utf8_mode; @@ -154,7 +154,7 @@ progress_bar_reset (struct progress_bar *bar) } static const char * -spinner (struct progress_bar *bar, int count) +spinner (struct progress_bar *bar, size_t count) { /* Choice of unicode spinners. * @@ -262,7 +262,8 @@ void progress_bar_set (struct progress_bar *bar, uint64_t position, uint64_t total) { - int i, cols, pulse_mode; + size_t i, cols; + int pulse_mode; double ratio; const char *s_open, *s_dot, *s_dash, *s_close; @@ -307,7 +308,7 @@ progress_bar_set (struct progress_bar *bar, fputs (s_open, stdout); if (!pulse_mode) { - int dots = ratio * (double) (cols - COLS_OVERHEAD); + size_t dots = ratio * (double) (cols - COLS_OVERHEAD); for (i = 0; i < dots; ++i) fputs (s_dot, stdout); |