Commit 830acd08 authored by Willy Tarreau's avatar Willy Tarreau Committed by Paul E. McKenney
Browse files

tools/nolibc/sys: make getpgrp(), getpid(), gettid() not set errno



These syscalls never fail so there is no need to extract and set errno
for them.

Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 6e277371
Loading
Loading
Loading
Loading
+3 −21
Original line number Diff line number Diff line
@@ -458,13 +458,7 @@ pid_t sys_getpgrp(void)
static __attribute__((unused))
pid_t getpgrp(void)
{
	pid_t ret = sys_getpgrp();

	if (ret < 0) {
		SET_ERRNO(-ret);
		ret = -1;
	}
	return ret;
	return sys_getpgrp();
}


@@ -481,13 +475,7 @@ pid_t sys_getpid(void)
static __attribute__((unused))
pid_t getpid(void)
{
	pid_t ret = sys_getpid();

	if (ret < 0) {
		SET_ERRNO(-ret);
		ret = -1;
	}
	return ret;
	return sys_getpid();
}


@@ -504,13 +492,7 @@ pid_t sys_gettid(void)
static __attribute__((unused))
pid_t gettid(void)
{
	pid_t ret = sys_gettid();

	if (ret < 0) {
		SET_ERRNO(-ret);
		ret = -1;
	}
	return ret;
	return sys_gettid();
}