[Toybox] [PATCH] remove unused flags from printf calls in ls.c's listfiles
enh
enh at google.com
Wed Feb 25 21:41:42 PST 2015
the ' ' flag doesn't mean anything for unsigned conversions.
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index d1a26ee..a924137 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -375,8 +375,8 @@ static void listfiles(int dirfd, struct dirtree *indir)
}
width += *len;
- if (flags & FLAG_i) xprintf("% *lu ", len[1], (unsigned long)st->st_ino);
- if (flags & FLAG_s) xprintf("% *lu ", len[6], (unsigned
long)st->st_blocks);
+ if (flags & FLAG_i) xprintf("%*lu ", len[1], (unsigned long)st->st_ino);
+ if (flags & FLAG_s) xprintf("%*lu ", len[6], (unsigned long)st->st_blocks);
if (flags & (FLAG_l|FLAG_o|FLAG_n|FLAG_g)) {
struct tm *tm;
1424929302.0
More information about the Toybox
mailing list