]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: wc: prefer static initialization
authorCollin Funk <collin.funk1@gmail.com>
Fri, 20 Feb 2026 05:11:27 +0000 (21:11 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 20 Feb 2026 05:11:27 +0000 (21:11 -0800)
* src/wc.c (main): Remove unnecessary initializations.

src/wc.c

index eb6c3d9e4ebf2d7690fc10081b8be77da3a55697..2e2a9b03cb805c54afdfcac6bbc2200b2986e043 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -813,10 +813,6 @@ main (int argc, char **argv)
 
   posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
 
-  print_lines = print_words = print_chars = print_bytes = false;
-  print_linelength = false;
-  total_lines = total_words = total_chars = total_bytes = max_line_length = 0;
-
   while ((optc = getopt_long (argc, argv, "clLmw", longopts, NULL)) != -1)
     switch (optc)
       {