]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Don't dump core if POSIXLY_CORRECT and given no arguments.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Sep 2004 06:32:10 +0000 (06:32 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Sep 2004 06:32:10 +0000 (06:32 +0000)
src/echo.c

index 9467af34592787b6b292186b9375fdcaae8d9e66..1447fcaf84e0933ba3dd29b1946710e4d3617004 100644 (file)
@@ -120,7 +120,7 @@ main (int argc, char **argv)
   bool display_return = true;
   bool allow_options =
     (! getenv ("POSIXLY_CORRECT")
-     || (! DEFAULT_ECHO_TO_XPG && 0 < argc && STREQ (argv[1], "-n")));
+     || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n")));
 
   /* System V machines already have a /bin/sh with a v9 behavior.
      Use the identical behavior for these machines so that the