summaryrefslogtreecommitdiff
path: root/kernel/syscalls/write.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-21 00:14:29 +0100
committerAnton Kling <anton@kling.gg>2024-02-21 00:14:29 +0100
commit8ff63b062d724826d8017504063df9b92f8e6703 (patch)
tree03bf0b5a278a4908da8912f956e5651bea9412f1 /kernel/syscalls/write.c
parenta85eacdd2406fede4d6ff5cb130b1758978cabb3 (diff)
New clang-format options
Diffstat (limited to 'kernel/syscalls/write.c')
-rw-r--r--kernel/syscalls/write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/syscalls/write.c b/kernel/syscalls/write.c
index ef8a46f..80c6e57 100644
--- a/kernel/syscalls/write.c
+++ b/kernel/syscalls/write.c
@@ -4,8 +4,9 @@
int syscall_write(int fd, const char *buf, size_t count) {
vfs_fd_t *fd_ptr = get_vfs_fd(fd);
- if (!fd_ptr)
+ if (!fd_ptr) {
return -EBADF;
+ }
int rc = vfs_pwrite(fd, (char *)buf, count, fd_ptr->offset);
fd_ptr->offset += rc;
return rc;