[hackers] [sbase] wc: Remove unnecessary precision specifier in format strings || Michael Forney

From: <git_AT_suckless.org>
Date: Sat, 2 Nov 2019 23:28:32 +0100 (CET)

commit 27f3ca6063c0d28af045d2e4a9ffac352fd322f9
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sat Nov 2 14:01:30 2019 -0700
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Sat Nov 2 14:03:10 2019 -0700

    wc: Remove unnecessary precision specifier in format strings
    
    The default precision for 'u' conversions is 1, so we don't need to
    specify it in the format string.

diff --git a/wc.c b/wc.c
index 05ddfa6..3ac530e 100644
--- a/wc.c
+++ b/wc.c
_AT_@ -17,17 +17,17 @@ output(const char *str, size_t nc, size_t nl, size_t nw)
         if (lflag) {
                 if (!first)
                         putchar(' ');
- printf("%*.1zu", first ? (first = 0) : 6, nl);
+ printf("%*zu", first ? (first = 0) : 6, nl);
         }
         if (wflag) {
                 if (!first)
                         putchar(' ');
- printf("%*.1zu", first ? (first = 0) : 6, nw);
+ printf("%*zu", first ? (first = 0) : 6, nw);
         }
         if (cmode) {
                 if (!first)
                         putchar(' ');
- printf("%*.1zu", first ? (first = 0) : 6, nc);
+ printf("%*zu", first ? (first = 0) : 6, nc);
         }
         if (str)
                 printf(" %s", str);
Received on Sat Nov 02 2019 - 23:28:32 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 02 2019 - 23:36:26 CET