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/libc/stdlib/mkstemp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'userland/libc/stdlib/mkstemp.c') diff --git a/userland/libc/stdlib/mkstemp.c b/userland/libc/stdlib/mkstemp.c index 1ea8790..0dec8e9 100644 --- a/userland/libc/stdlib/mkstemp.c +++ b/userland/libc/stdlib/mkstemp.c @@ -1,14 +1,17 @@ #include #include -char rand_char(void) { return 'A' + (rand() % 10); } +char rand_char(void) { + return 'A' + (rand() % 10); +} int mkstemp(char *template) { // FIXME: Incomplete const char *s = template; for (; *template; template ++) { - if ('X' == *template) + if ('X' == *template) { *template = rand_char(); + } } return open(s, O_RDWR, O_CREAT); } -- cgit v1.2.3