Skip to content

Commit

Permalink
clarify type and unit checking
Browse files Browse the repository at this point in the history
  • Loading branch information
imyxh committed Oct 13, 2023
1 parent bf5cb74 commit 39e6ca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libaylp/anyloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int main(int argc, char **argv)
);
// typecheck fails if any of the bits set in type_cur are not
// set in type_in
if ((d.type_in ^ type_cur) & type_cur) {
if (type_cur & ~d.type_in) {
log_fatal("Device %s with input type 0x%hX "
"is incompatible with previous type 0x%hX",
d.uri, d.type_in, type_cur
Expand All @@ -198,7 +198,7 @@ int main(int argc, char **argv)
log_trace("unit check: prev=0x%hX, in=0x%hX, out=0x%hX",
units_cur, d.units_in, d.units_out
);
if (!(d.units_in & units_cur)) {
if (units_cur & ~d.units_in) {
log_fatal("Device %s with input units 0x%hX "
"is incompatible with previous units 0x%hX",
d.uri, d.units_in, units_cur
Expand Down

0 comments on commit 39e6ca5

Please sign in to comment.