summaryrefslogtreecommitdiff
path: root/kernel/syscall.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2022-08-22 19:53:09 -0400
committerFrans Kaashoek <[email protected]>2022-08-22 19:53:09 -0400
commit2a391ebc8ba1fd0e6f0899277218d531fd5c7396 (patch)
tree81fb25b6d7317db8b7a02ae1a9f5705776368c63 /kernel/syscall.c
parent7086197c27f7c00544ca006561336d8d5791a482 (diff)
downloadxv6-labs-2a391ebc8ba1fd0e6f0899277218d531fd5c7396.tar.gz
xv6-labs-2a391ebc8ba1fd0e6f0899277218d531fd5c7396.tar.bz2
xv6-labs-2a391ebc8ba1fd0e6f0899277218d531fd5c7396.zip
Make argint() and argaddr() of type void (thanks Harry Porter)
Diffstat (limited to 'kernel/syscall.c')
-rw-r--r--kernel/syscall.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/syscall.c b/kernel/syscall.c
index dd7a33e..ee94696 100644
--- a/kernel/syscall.c
+++ b/kernel/syscall.c
@@ -53,21 +53,19 @@ argraw(int n)
}
// Fetch the nth 32-bit system call argument.
-int
+void
argint(int n, int *ip)
{
*ip = argraw(n);
- return 0;
}
// Retrieve an argument as a pointer.
// Doesn't check for legality, since
// copyin/copyout will do that.
-int
+void
argaddr(int n, uint64 *ip)
{
*ip = argraw(n);
- return 0;
}
// Fetch the nth word-sized system call argument as a null-terminated string.
@@ -77,8 +75,7 @@ int
argstr(int n, char *buf, int max)
{
uint64 addr;
- if(argaddr(n, &addr) < 0)
- return -1;
+ argaddr(n, &addr);
return fetchstr(addr, buf, max);
}