aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:45:45 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:45:45 +0100
commit327f550669a80d72f36bc9e4de619c163aa46eff (patch)
treed304092aeb06539085be1385ab9298876c414b44 /coreutils
parent9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (diff)
downloadbusybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.tar.gz
busybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.tar.bz2
busybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.zip
Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cal.c2
-rw-r--r--coreutils/sum.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/cal.c b/coreutils/cal.c
index 0d388aa1c..12c46b14f 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -165,7 +165,7 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
165 char lineout[30]; 165 char lineout[30];
166 166
167 day_array(month, year, dp); 167 day_array(month, year, dp);
168 len = sprintf(lineout, "%s %d", month_names[month - 1], year); 168 len = sprintf(lineout, "%s %u", month_names[month - 1], year);
169 printf("%*s%s\n%s\n", 169 printf("%*s%s\n%s\n",
170 ((7*julian + WEEK_LEN) - len) / 2, "", 170 ((7*julian + WEEK_LEN) - len) / 2, "",
171 lineout, day_headings); 171 lineout, day_headings);
diff --git a/coreutils/sum.c b/coreutils/sum.c
index 75f6ef60a..deb068e10 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -70,9 +70,9 @@ static unsigned sum_file(const char *file, unsigned type)
70 if (type >= SUM_SYSV) { 70 if (type >= SUM_SYSV) {
71 r = (s & 0xffff) + ((s & 0xffffffff) >> 16); 71 r = (s & 0xffff) + ((s & 0xffffffff) >> 16);
72 s = (r & 0xffff) + (r >> 16); 72 s = (r & 0xffff) + (r >> 16);
73 printf("%d %llu %s\n", s, (total_bytes + 511) / 512, file); 73 printf("%u %llu %s\n", s, (total_bytes + 511) / 512, file);
74 } else 74 } else
75 printf("%05d %5llu %s\n", s, (total_bytes + 1023) / 1024, file); 75 printf("%05u %5llu %s\n", s, (total_bytes + 1023) / 1024, file);
76 return 1; 76 return 1;
77#undef buf 77#undef buf
78} 78}