about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-09-28 01:58:03 +0000
committerRoland McGrath <roland@gnu.org>2004-09-28 01:58:03 +0000
commitf26e84d344497de9960ea4eb52ccb16979440923 (patch)
treec6eab2754367199653b782a5bf729c19ed384011
parent357420c512f4c4d1a73e5ce2b680fcc59c8c468b (diff)
downloadglibc-f26e84d344497de9960ea4eb52ccb16979440923.tar.gz
glibc-f26e84d344497de9960ea4eb52ccb16979440923.tar.xz
glibc-f26e84d344497de9960ea4eb52ccb16979440923.zip
2004-09-27 Roland McGrath <roland@redhat.com>
	* sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit
	twiddling in last change.
-rw-r--r--bits/waitstatus.h2
-rw-r--r--sysdeps/generic/bits/waitstatus.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/bits/waitstatus.h b/bits/waitstatus.h
index 98da41858e..699c224989 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 98da41858e..699c224989 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)