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/stdio/stdin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'userland/libc/stdio/stdin.c') diff --git a/userland/libc/stdio/stdin.c b/userland/libc/stdio/stdin.c index e497167..4620df3 100644 --- a/userland/libc/stdio/stdin.c +++ b/userland/libc/stdio/stdin.c @@ -36,8 +36,9 @@ size_t write_fd(FILE *f, const unsigned char *s, size_t l) { size_t non_cache_read_fd(FILE *f, unsigned char *s, size_t l) { int rc = read(f->fd, s, l); - if (rc == 0) + if (rc == 0) { f->is_eof = 1; + } if (rc == -1) { f->has_error = 1; return 0; @@ -46,8 +47,9 @@ size_t non_cache_read_fd(FILE *f, unsigned char *s, size_t l) { } size_t read_fd(FILE *f, unsigned char *s, size_t l) { - if (0 == l) + if (0 == l) { return 0; + } // Skip using cache if the length being requested if longer than or // equal to the cache block size. This avoids doing a bunch of extra -- cgit v1.2.3