diff options
author | marck <marck@FreeBSD.org> | 2006-08-06 08:37:46 +0000 |
---|---|---|
committer | marck <marck@FreeBSD.org> | 2006-08-06 08:37:46 +0000 |
commit | c55c3007651a0b96b412a5a2fb7546e200f7e2f6 (patch) | |
tree | 093b038c0f5b2b202a3bee9f082782d4fa285d87 | |
parent | 99dcbcf3fdea5b7f21d515960ad280c3cb5ccf0f (diff) | |
download | FreeBSD-src-c55c3007651a0b96b412a5a2fb7546e200f7e2f6.zip FreeBSD-src-c55c3007651a0b96b412a5a2fb7546e200f7e2f6.tar.gz |
strlen(3) returns size_t, which is not strictly equivalent to int an 64-bit
archs, hence printf(3) warning. Fix this.
Noticed by: tinderbox
Approved by: rse
-rw-r--r-- | sbin/dump/optr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 0d70b9e..4bdc172 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -209,14 +209,15 @@ timeest(void) mins = (deltat % 3600) / 60; tdone_str = ctime(&tdone); + tdone_str[(strlen(tdone_str) - 1)] = '\0'; setproctitle( - "%s: pass %d: %3.2f%% done, finished in %d:%02d at %.*s", - disk, passno, percent, hours, mins, strlen(tdone_str) - 1, tdone_str); + "%s: pass %d: %3.2f%% done, finished in %d:%02d at %s", + disk, passno, percent, hours, mins, tdone_str); if (tnow >= tschedule) { tschedule = tnow + 300; if (blockswritten < 500) return; - msg("%3.2f%% done, finished in %d:%02d at %s", percent, + msg("%3.2f%% done, finished in %d:%02d at %s\n", percent, hours, mins, tdone_str); } } |