2004-09-27 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Tue, 28 Sep 2004 01:58:03 +0000 (01:58 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 28 Sep 2004 01:58:03 +0000 (01:58 +0000)
* sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit
twiddling in last change.

bits/waitstatus.h
sysdeps/generic/bits/waitstatus.h

index 98da418..699c224 100644 (file)
@@ -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)
index 98da418..699c224 100644 (file)
@@ -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)