hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 3869d7fa297fccc13b00ecbe25ea9d15fecca4a0
parent a3b3752e3e543bf5c76c7cc73b9733ec113ed8e1
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 20 Apr 2021 10:54:17 -0400

unix: don't use negative unsigned constants

Diffstat:
Munix/setuid.ha | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/unix/setuid.ha b/unix/setuid.ha @@ -8,7 +8,7 @@ use rt; // therefore we require this function to succeed. If you need to handle the // error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, // and take extreme care to handle errors correctly. -export fn setuid(uid: uint) void = rt::setresuid(uid, -1u, -1u) as void; +export fn setuid(uid: uint) void = rt::setresuid(uid, -1: uint, -1: uint) as void; // Sets the caller's effective user ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -18,7 +18,7 @@ export fn setuid(uid: uint) void = rt::setresuid(uid, -1u, -1u) as void; // therefore we require this function to succeed. If you need to handle the // error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, // and take extreme care to handle errors correctly. -export fn seteuid(uid: uint) void = rt::setresuid(-1u, uid, -1u) as void; +export fn seteuid(uid: uint) void = rt::setresuid(-1: uint, uid, -1: uint) as void; // Sets the caller's group ID to the specified value. This generally requires // elevated permissions from the calling process. @@ -28,7 +28,7 @@ export fn seteuid(uid: uint) void = rt::setresuid(-1u, uid, -1u) as void; // therefore we require this function to succeed. If you need to handle the // error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, // and take extreme care to handle errors correctly. -export fn setgid(gid: uint) void = rt::setresgid(gid, -1u, -1u) as void; +export fn setgid(gid: uint) void = rt::setresgid(gid, -1: uint, -1: uint) as void; // Sets the caller's effective group ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -38,4 +38,4 @@ export fn setgid(gid: uint) void = rt::setresgid(gid, -1u, -1u) as void; // therefore we require this function to succeed. If you need to handle the // error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, // and take extreme care to handle errors correctly. -export fn setegid(gid: uint) void = rt::setresgid(-1u, gid, -1u) as void; +export fn setegid(gid: uint) void = rt::setresgid(-1: uint, gid, -1: uint) as void;