From: Paul Eggert Date: Mon, 20 Sep 2004 06:32:10 +0000 (+0000) Subject: (main): Don't dump core if POSIXLY_CORRECT and given no arguments. X-Git-Tag: v5.3.0~668 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82a84d38cb1620d869e0b54952b6a2f9f92acebc;p=thirdparty%2Fcoreutils.git (main): Don't dump core if POSIXLY_CORRECT and given no arguments. --- diff --git a/src/echo.c b/src/echo.c index 9467af3459..1447fcaf84 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