From f0bda71fe2a4df4201c6195be1fe46cf895c134d Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 28 Aug 2022 13:02:10 +0200 Subject: shared/path_simplify: return an unsigned value --- src/kernel/syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index d7ac5b2..7b5d294 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -96,7 +96,7 @@ handle_t _syscall_open(const char __user *path, long len, int flags) { if (!virt_cpy_from(process_current->pages, path_buf, path, len)) goto fail; len = path_simplify(path_buf, path_buf, len); - if (len < 0) goto fail; + if (len == 0) goto fail; mount = vfs_mount_resolve(process_current->mount, path_buf, len); if (!mount) goto fail; @@ -138,7 +138,7 @@ long _syscall_mount(handle_t hid, const char __user *path, long len) { if (!virt_cpy_from(process_current->pages, path_buf, path, len)) goto fail; len = path_simplify(path_buf, path_buf, len); - if (len < 0) goto fail; + if (len == 0) goto fail; // remove trailing slash // mounting something under `/this` and `/this/` should be equalivent -- cgit v1.2.3