aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/echo.c4
-rw-r--r--toys/posix/head.c1
2 files changed, 1 insertions, 4 deletions
diff --git a/toys/posix/echo.c b/toys/posix/echo.c
index 639f87ab..63eb1981 100644
--- a/toys/posix/echo.c
+++ b/toys/posix/echo.c
@@ -65,7 +65,7 @@ void echo_main(void)
int slash = *(c++), n = unescape(slash);
if (n) out = n;
- else if (slash=='c') goto done;
+ else if (slash=='c') return;
else if (slash=='0') {
out = 0;
while (*c>='0' && *c<='7' && n++<3) out = (out*8)+*(c++)-'0';
@@ -90,6 +90,4 @@ void echo_main(void)
// Output "\n" if no -n
if (!(toys.optflags&FLAG_n)) putchar('\n');
-done:
- xflush();
}
diff --git a/toys/posix/head.c b/toys/posix/head.c
index 7e34a714..38ab919e 100644
--- a/toys/posix/head.c
+++ b/toys/posix/head.c
@@ -40,7 +40,6 @@ static void do_head(int fd, char *name)
// Print an extra newline for all but the first file
if (TT.file_no) xprintf("\n");
xprintf("==> %s <==\n", name);
- xflush();
}
while ((toys.optflags&FLAG_c) ? bytes : lines) {