]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: seq: prefer static initialization
authorCollin Funk <collin.funk1@gmail.com>
Fri, 20 Feb 2026 04:53:20 +0000 (20:53 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 20 Feb 2026 04:53:20 +0000 (20:53 -0800)
* src/seq.c (separator): Initialize variable.
(main): Remove unnecessary initializations.

src/seq.c

index 29c332da019f147e63dcf23d09a1a959cae49197..a49a18988b55fc9f73c0428a958b817a355a0055 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -55,7 +55,7 @@ static bool locale_ok;
 static bool equal_width;
 
 /* The string used to separate two numbers.  */
-static char const *separator;
+static char const *separator = "\n";
 
 /* The string output after all numbers have been output.
    Usually "\n" or "\0".  */
@@ -560,9 +560,6 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  equal_width = false;
-  separator = "\n";
-
   /* We have to handle negative numbers in the command line but this
      conflicts with the command line arguments.  So explicitly check first
      whether the next argument looks like a negative number.  */