mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
flag parameters: check magic constants
This patch adds test that ensure the boundary conditions for the various constants introduced in the previous patches is met. No code is generated. [akpm@linux-foundation.org: fix alpha] Signed-off-by: Ulrich Drepper <drepper@redhat.com> Acked-by: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk.manpages@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
510df2dd48
commit
e38b36f325
6 changed files with 25 additions and 0 deletions
|
@ -1051,6 +1051,9 @@ asmlinkage long sys_epoll_create2(int size, int flags)
|
|||
int error, fd = -1;
|
||||
struct eventpoll *ep;
|
||||
|
||||
/* Check the EPOLL_* constant for consistency. */
|
||||
BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC);
|
||||
|
||||
if (flags & ~EPOLL_CLOEXEC)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue