Browse Source

2004-09-27 Roland McGrath <roland@redhat.com>

* sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit
	twiddling in last change.
cvs/glibc-2_3-branch
Roland McGrath 22 years ago
parent
commit
f26e84d344
  1. 2
      bits/waitstatus.h
  2. 2
      sysdeps/generic/bits/waitstatus.h

2
bits/waitstatus.h

@ -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)

2
sysdeps/generic/bits/waitstatus.h

@ -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…
Cancel
Save