For some reason casting to signed byte

Also, optimization! `>> 1 > 0` could be turned into `>= 2`. Thanks, rust libc
This commit is contained in:
jD91mZM2
2018-01-05 19:30:08 +01:00
parent d02a393781
commit e145ba3ea9

View File

@@ -373,5 +373,5 @@ pub fn wifcontinued(status: usize) -> bool {
/// True if STATUS indicates termination by a signal.
#[inline(always)]
pub fn wifsignaled(status: usize) -> bool {
((status & 0x7f) + 1) >> 1 > 0
((status & 0x7f) + 1) as i8 >= 2
}