Fixed usage of human_readable() in '%k' format specifier to fix a bug

reported by Dmitry V. Levin (arguments to human_readable() were
specified in the wrong order, which resulted in a floating-point
error).
This commit is contained in:
James Youngman
2004-10-02 11:05:38 +00:00
parent 0b9216bee2
commit cc587db0dd

View File

@@ -625,8 +625,8 @@ pred_fprintf (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
case 'k': /* size in 1K blocks */
fprintf (fp, segment->text,
human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf),
hbuf,
ST_NBLOCKSIZE, 1024, human_ceiling));
hbuf, human_ceiling,
ST_NBLOCKSIZE, 1024));
break;
case 'l': /* object of symlink */
#ifdef S_ISLNK