libroot: Use RETURN_AND_SET_ERRNO from the utils header in ioctl.
No functional change intended. Change-Id: I5e6a060fe8e036bc4d4b8b8cc95a4e8d0ea00f81 Reviewed-on: https://review.haiku-os.org/549 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
aa39f874dc
commit
77d2c1df0e
@ -10,14 +10,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <errno_private.h>
|
||||
|
||||
|
||||
#define RETURN_AND_SET_ERRNO(err) \
|
||||
if (err < 0) { \
|
||||
__set_errno(err); \
|
||||
return -1; \
|
||||
} \
|
||||
return err;
|
||||
#include <syscall_utils.h>
|
||||
|
||||
|
||||
int
|
||||
@ -35,5 +28,5 @@ ioctl(int fd, ulong cmd, ...)
|
||||
|
||||
status = _kern_ioctl(fd, cmd, argument, size);
|
||||
|
||||
RETURN_AND_SET_ERRNO(status)
|
||||
RETURN_AND_SET_ERRNO(status);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user