From: Paul Eggert Date: Wed, 2 Aug 2023 13:47:13 +0000 (-0700) Subject: pinky: fix "d" typo X-Git-Tag: v9.4~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93e30466ff6eec8a2cd66374e199017763821478;p=thirdparty%2Fcoreutils.git pinky: fix "d" typo Problem reported by Bruno Haible (bug#65003). * src/pinky.c (idle_string): Fix recently-introduced typo: missing "d" for "days". --- diff --git a/src/pinky.c b/src/pinky.c index 381e753b61..b6d411c858 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -147,7 +147,7 @@ static char const * idle_string (time_t when) { static time_t now = 0; - static char buf[INT_STRLEN_BOUND (intmax_t) + 2]; + static char buf[INT_STRLEN_BOUND (intmax_t) + sizeof "d"]; time_t seconds_idle; if (now == 0) @@ -165,7 +165,7 @@ idle_string (time_t when) else { intmax_t days = seconds_idle / (24 * 60 * 60); - sprintf (buf, "%"PRIdMAX, days); + sprintf (buf, "%"PRIdMAX"d", days); } return buf; }