aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-test-audio.cpp
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-17 14:17:40 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-04-20 14:40:14 +0200
commit1425381bd70753c6a5a279c0816ef54d50eb2147 (patch)
tree5e8012a284aed4ec235cd8dab5f3f79cbc70bf5e /utils/cec-compliance/cec-test-audio.cpp
parent2f2d158cdc69973c6d89d23f24b953736aeedaad (diff)
utils: simplify bool returns
Found with readability-simplify-boolean-expr Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance/cec-test-audio.cpp')
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 576d59c6..d422a7da 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -113,9 +113,7 @@ static bool pa_are_adjacent(__u16 pa1, __u16 pa2)
return false;
if ((pa1 & trail_mask) || (pa2 & trail_mask))
return false;
- if (!((pa1 & ~mask) && (pa2 & ~mask)))
- return true;
- return false;
+ return !((pa1 & ~mask) && (pa2 & ~mask));
}
static bool pa_is_upstream_from(__u16 pa1, __u16 pa2)
@@ -124,9 +122,7 @@ static bool pa_is_upstream_from(__u16 pa1, __u16 pa2)
if (pa1 == CEC_PHYS_ADDR_INVALID || pa2 == CEC_PHYS_ADDR_INVALID)
return false;
- if (!(pa1 & ~mask) && (pa2 & ~mask))
- return true;
- return false;
+ return !(pa1 & ~mask) && (pa2 & ~mask);
}
static int arc_initiate_tx(struct node *node, unsigned me, unsigned la, bool interactive)

Privacy Policy