aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-follower/cec-processing.cpp
diff options
context:
space:
mode:
authorDeborah Brouwer <deborahbrouwer3563@gmail.com>2021-06-15 11:53:07 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-06-16 08:48:30 +0200
commit04ad17f8f850a5c35de6e0f8b8b1e9e76e66ffca (patch)
treebcdda5b16fc6c27165fd6a7d6cf5ee46c0f13845 /utils/cec-follower/cec-processing.cpp
parent0861740383d3e1c52239f0a5b19da44ccb1a29d6 (diff)
cec: remove redundant struct cec_msg initializations
It is redundant to initialize a struct cec_msg variable with an empty list if the variable is also initialized by a call to cec_msg_init. Remove these redundant initializations. Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-follower/cec-processing.cpp')
-rw-r--r--utils/cec-follower/cec-processing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index 5385b335..41bb990c 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -262,7 +262,7 @@ static void update_deck_state(struct node *node, unsigned me, __u8 deck_state_ne
node->state.deck_state = deck_state_new;
if (node->state.deck_report_changes) {
- struct cec_msg msg = {};
+ struct cec_msg msg;
cec_msg_init(&msg, me, node->state.deck_report_changes_to);
cec_msg_deck_status(&msg, node->state.deck_state);
@@ -1095,7 +1095,7 @@ void testProcessing(struct node *node, bool wallclock)
if (node->cec_version >= CEC_OP_CEC_VERSION_2_0 &&
last_pwr_state != pwr_state &&
(time_to_stable > 2 || pwr_state < CEC_OP_POWER_STATUS_TO_ON)) {
- struct cec_msg msg = {};
+ struct cec_msg msg;
cec_msg_init(&msg, me, CEC_LOG_ADDR_BROADCAST);
cec_msg_report_power_status(&msg, pwr_state);
@@ -1118,7 +1118,7 @@ void testProcessing(struct node *node, bool wallclock)
if (poll_la != me &&
poll_la != last_poll_la && poll_la < 15 && la_info[poll_la].ts &&
ts_to_ms(ts_now - la_info[poll_la].ts) > POLL_PERIOD) {
- struct cec_msg msg = {};
+ struct cec_msg msg;
cec_msg_init(&msg, me, poll_la);
transmit(node, &msg);

Privacy Policy