mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
2004-09-27 Roland McGrath <roland@redhat.com>
* sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit twiddling in last change.
This commit is contained in:
parent
357420c512
commit
f26e84d344
@ -39,7 +39,7 @@
|
||||
|
||||
/* Nonzero if STATUS indicates termination by a signal. */
|
||||
#define __WIFSIGNALED(status) \
|
||||
(((signed char) ((((((status) + 1) & 0xffff) - 1) & 0x7f) + 1) >> 1) > 0)
|
||||
(((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
|
||||
|
||||
/* Nonzero if STATUS indicates the child is stopped. */
|
||||
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
/* Nonzero if STATUS indicates termination by a signal. */
|
||||
#define __WIFSIGNALED(status) \
|
||||
(((signed char) ((((((status) + 1) & 0xffff) - 1) & 0x7f) + 1) >> 1) > 0)
|
||||
(((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
|
||||
|
||||
/* Nonzero if STATUS indicates the child is stopped. */
|
||||
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
|
||||
|
Loading…
Reference in New Issue
Block a user