diff options
author | Anton Kling <anton@kling.gg> | 2024-12-12 16:03:08 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-12-12 16:03:08 +0100 |
commit | b033314bf1901d436dc71d41d5e1f37dda47e511 (patch) | |
tree | 120bd137888a7f96904a47af7d20422608ffe225 /userland/minibox/utilities/echo.c | |
parent | dcbcdbdc5bcfb86eca05fb655e3bf009d89e39e0 (diff) |
formatting: Use clang-format on all projects
This commit also add braces to all `if` statements.
Diffstat (limited to 'userland/minibox/utilities/echo.c')
-rw-r--r-- | userland/minibox/utilities/echo.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); } |