diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2011-11-22 16:40:37 +0000 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2011-11-22 16:41:48 +0000 |
| commit | 9b102aae65449a8d321e8cf44a3993af558291db (patch) | |
| tree | 307c7ff57f84f87cab48805ed66c4e5c9bf279e1 /df | |
| parent | 99ec97dcdfaf242ba0683a230ba51e4a87f7458b (diff) | |
| download | libguestfs-9b102aae65449a8d321e8cf44a3993af558291db.tar.gz libguestfs-9b102aae65449a8d321e8cf44a3993af558291db.tar.xz libguestfs-9b102aae65449a8d321e8cf44a3993af558291db.zip | |
Don't rely on implicit promotion of float to double in printf args.
Diffstat (limited to 'df')
| -rw-r--r-- | df/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/df/output.c b/df/output.c index ea981b8f..2950fff2 100644 --- a/df/output.c +++ b/df/output.c @@ -157,7 +157,7 @@ print_stat (const char *name, const char *uuid_param, /* Use 'ceil' on the percentage in order to emulate what df itself does. */ snprintf (buf[3], MAX_LEN, "%3.0f%%", ceil (percent)); else - snprintf (buf[3], MAX_LEN, "%.1f", percent); + snprintf (buf[3], MAX_LEN, "%.1f", (double) percent); cols[3] = buf[3]; #undef MAX_LEN |
