summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2007-06-08 12:52:17 +0000
committerBernhard Reutner-Fischer2007-06-08 12:52:17 +0000
commitdef8260219797b0f9f734915f4918f34e85e7049 (patch)
treec4173b03ce4e93aebc7bd5542896bfedd51862a6
parent42bffbf360975515b41fce94382b27857cfcf994 (diff)
downloadbusybox-def8260219797b0f9f734915f4918f34e85e7049.zip
busybox-def8260219797b0f9f734915f4918f34e85e7049.tar.gz
- fix invocation without any argument
-rw-r--r--coreutils/echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 1016d38..11507b4 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -34,6 +34,8 @@ int bb_echo(char **argv)
nflag = 1, /* 1 -- print '\n' */
};
arg = ++argv;
+ if (!arg)
+ goto newline_ret;
#else
const char *p;
char nflag = 1;
@@ -107,9 +109,7 @@ int bb_echo(char **argv)
putchar(' ');
}
-#if ENABLE_FEATURE_FANCY_ECHO
newline_ret:
-#endif
if (nflag) {
putchar('\n');
}