This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/3] Remove useless #ifdefs from sysdeps/unix/sysv/linux/sigprocmask.c
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: libc-alpha at sourceware dot org
- Cc: Yury Norov <ynorov at caviumnetworks dot com>
- Date: Mon, 16 Oct 2017 07:34:05 +0300
- Subject: [PATCH 1/3] Remove useless #ifdefs from sysdeps/unix/sysv/linux/sigprocmask.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuri dot Norov at cavium dot com;
- References: <20171016043407.1142-1-ynorov@caviumnetworks.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
The sysdeps/unix/sysv/linux/sigprocmask.c includes nptl-signals.h
via nptl/pthreadP.h, and so SIGCANCEL and SIGSETXID become defined
unconditionally. But later in the code, there are some checks weither
symbols defined, which is useless. This patch removes useless checks.
* sysdeps/unix/sysv/linux/sigprocmask.c: Remove useless #ifdefs
---
sysdeps/unix/sysv/linux/sigprocmask.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
index d0b8e049b2..e776563336 100644
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
@@ -30,26 +30,19 @@
int
__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
{
-#ifdef SIGCANCEL
sigset_t local_newmask;
/* The only thing we have to make sure here is that SIGCANCEL and
SIGSETXID are not blocked. */
if (set != NULL
&& (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
-# ifdef SIGSETXID
- || __builtin_expect (__sigismember (set, SIGSETXID), 0)
-# endif
- ))
+ || __builtin_expect (__sigismember (set, SIGSETXID), 0)))
{
local_newmask = *set;
__sigdelset (&local_newmask, SIGCANCEL);
-# ifdef SIGSETXID
__sigdelset (&local_newmask, SIGSETXID);
-# endif
set = &local_newmask;
}
-#endif
return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
}
--
2.11.0