summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-09-20 06:32:10 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-09-20 06:32:10 +0000
commit82a84d38cb1620d869e0b54952b6a2f9f92acebc (patch)
tree8d6663209fb4b77f05aefad8ba3f517e1ac7858f /src
parentd89f5a3b8f024b41a6055c08a62110af18d4511d (diff)
downloadcoreutils-82a84d38cb1620d869e0b54952b6a2f9f92acebc.tar.xz
(main): Don't dump core if POSIXLY_CORRECT and given no arguments.
Diffstat (limited to 'src')
-rw-r--r--src/echo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/echo.c b/src/echo.c
index 9467af345..1447fcaf8 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -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