diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 92d777f7e..f05bf48f3 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -1523,8 +1523,8 @@ static inline int event_sort(struct spa_pod_control *a, const void *abody, const uint32_t *sa = abody, *sb = bbody; if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4) return 0; - if ((sa[0] >> 28) != 2 || (sa[0] >> 28) != 4 || - (sb[0] >> 28) != 2 || (sb[0] >> 28) != 4) + if (((sa[0] >> 28) != 2 && (sa[0] >> 28) != 4) || + ((sb[0] >> 28) != 2 && (sb[0] >> 28) != 4)) return 0; return event_compare(sa[0] >> 16, sb[0] >> 16); } diff --git a/spa/plugins/control/mixer.c b/spa/plugins/control/mixer.c index d71a1e16d..caf3a6b06 100644 --- a/spa/plugins/control/mixer.c +++ b/spa/plugins/control/mixer.c @@ -679,8 +679,8 @@ static inline int event_sort(struct spa_pod_control *a, const void *abody, const uint32_t *da = abody, *db = bbody; if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4) return 0; - if ((da[0] >> 28) != 2 || (da[0] >> 28) != 4 || - (db[0] >> 28) != 2 || (db[0] >> 28) != 4) + if (((da[0] >> 28) != 2 && (da[0] >> 28) != 4) || + ((db[0] >> 28) != 2 && (db[0] >> 28) != 4)) return 0; return event_compare(da[0] >> 16, db[0] >> 16); }