aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-02-10 16:05:09 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-02-10 16:05:09 +0100
commit6878c4d1655f8527a259c603560d7c646354d59d (patch)
treee2621c9a9150f486de576a350601140175a03dd7
parent48fe12520bb61fb5347409f0e5def5c5a552486f (diff)
cec-ctl: remove trailing space in output
When logging a message a trailing space would be printed in some situations. Remove it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-ctl/cec-ctl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index e3fa26b6..3bdb48e9 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -752,13 +752,13 @@ static void show_msg(const cec_msg &msg)
std::string status;
if ((msg.tx_status & ~CEC_TX_STATUS_OK) ||
(msg.rx_status & ~CEC_RX_STATUS_OK))
- status = cec_status2s(msg);
+ status = std::string(" ") + cec_status2s(msg);
if (verbose && transmitted)
- printf("\tSequence: %u Tx Timestamp: %s %s\n",
+ printf("\tSequence: %u Tx Timestamp: %s%s\n",
msg.sequence, ts2s(msg.tx_ts).c_str(),
status.c_str());
else if (verbose && !transmitted)
- printf("\tSequence: %u Rx Timestamp: %s %s\n",
+ printf("\tSequence: %u Rx Timestamp: %s%s\n",
msg.sequence, ts2s(msg.rx_ts).c_str(),
status.c_str());
}

Privacy Policy