Skip to content

Commit

Permalink
Update src/syslog.rs
Browse files Browse the repository at this point in the history
Co-authored-by: SteveLauC <[email protected]>
  • Loading branch information
tisonkun and SteveLauC authored Jan 12, 2025
1 parent 72a4edd commit 37e855d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ impl LogMask {

/// Returns if the mask for the specified `priority` is set.
pub fn contains(&self, priority: Severity) -> bool {
let pri = priority as libc::c_int;
(self.0 & (1 << pri)) != 0
let priority = Self::of_priority(priority);
let and_result = self & priority;
and_result != 0
}
}

Expand Down

0 comments on commit 37e855d

Please sign in to comment.