From: Roland McGrath Date: Tue, 28 Sep 2004 01:58:03 +0000 (+0000) Subject: 2004-09-27 Roland McGrath X-Git-Tag: cvs/fedora-glibc-20040929T0821~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f26e84d344497de9960ea4eb52ccb16979440923;p=thirdparty%2Fglibc.git 2004-09-27 Roland McGrath * sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit twiddling in last change. --- diff --git a/bits/waitstatus.h b/bits/waitstatus.h index 98da41858ed..699c2249894 100644 --- a/bits/waitstatus.h +++ b/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) diff --git a/sysdeps/generic/bits/waitstatus.h b/sysdeps/generic/bits/waitstatus.h index 98da41858ed..699c2249894 100644 --- a/sysdeps/generic/bits/waitstatus.h +++ b/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)