From b033314bf1901d436dc71d41d5e1f37dda47e511 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 12 Dec 2024 16:03:08 +0100 Subject: formatting: Use clang-format on all projects This commit also add braces to all `if` statements. --- userland/minibox/utilities/echo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'userland/minibox/utilities/echo.c') diff --git a/userland/minibox/utilities/echo.c b/userland/minibox/utilities/echo.c index 5ec68a7..f184d4a 100644 --- a/userland/minibox/utilities/echo.c +++ b/userland/minibox/utilities/echo.c @@ -7,24 +7,27 @@ int echo(char **str, int new_line) { for (; *str;) { printf("%s", *str); - if (*++str) + if (*++str) { putchar(' '); + } } - if (new_line) + if (new_line) { putchar('\n'); + } return 0; } int echo_main(int argc, char **argv) { int new_line = 1; - for (; *++argv && '-' == **argv;) + for (; *++argv && '-' == **argv;) { switch (*(*argv + 1)) { case 'n': new_line = 0; break; } + } return echo(argv, new_line); } -- cgit v1.2.3