Skip to content

Commit 7689657

Browse files
devnexenVexu
authored andcommitted
std.c: fix freebsd's CPU_ISSET call
1 parent f8991ba commit 7689657

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/c/freebsd.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ pub fn CPU_SET(cpu: usize, set: *cpuset_t) void {
3838
}
3939
}
4040

41-
pub fn CPU_ISSET(cpu: usize, set: cpuset_t) void {
41+
pub fn CPU_ISSET(cpu: usize, set: cpuset_t) bool {
4242
const x = cpu / @sizeOf(c_long);
4343
if (x < @sizeOf(cpuset_t)) {
44-
return set.__bits[x] & __BIT_MASK(x);
44+
return set.__bits[x] & __BIT_MASK(x) != 0;
4545
}
4646
return false;
4747
}

0 commit comments

Comments
 (0)