aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-ctl/cec-ctl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/cec-ctl/cec-ctl.cpp')
-rw-r--r--utils/cec-ctl/cec-ctl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 9b289cb4..10c5b27a 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1797,8 +1797,8 @@ int main(int argc, char **argv)
if (ch == -1)
break;
- if (ch > OptMessages || ch == OptPoll)
- cec_msg_init(&msg, 0, 0);
+ cec_msg_init(&msg, 0, 0);
+ msg.msg[0] = cec_msg_is_broadcast(&msg) ? 0xf : (options[OptTo] ? to : 0xf0);
options[(int)ch] = 1;
switch (ch) {
@@ -2135,7 +2135,6 @@ int main(int argc, char **argv)
break;
opt = opt2message[ch - OptMessages];
parse_msg_args(msg, reply, opt, ch);
- msg.msg[0] = cec_msg_is_broadcast(&msg) ? 0xf : (options[OptTo] ? to : 0xf0);
msgs.push_back(msg);
break;
}

Privacy Policy