From a37c6855733695e71c9e231bfc65a423a5ee586b Mon Sep 17 00:00:00 2001 From: Hendi Date: Mon, 23 Jan 2023 23:44:05 +0100 Subject: [PATCH] Remove dead code from CRCInput::getMsg_us() The two events in question are posted in CInfoViewer::getEPG() and they're handled in CRemoteControl::handleMsg(). They are written to the high/low priority pipes only, so there should be no way that they end up in the event socket, which is what the code path in question here deals with. Apart from that, the type the buffer was casted to was completely wrong, so if this code was ever executed, it would have faulted. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/58966baac8b49c2dc6fe5d211b01871470d08da4 Author: Hendi Date: 2023-01-23 (Mon, 23 Jan 2023) ------------------ This commit was generated by Migit --- src/driver/rcinput.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index cc6054881..b80b8cacc 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1293,20 +1293,9 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 else printf("[neutrino] event - unknown initiatorID 0x%x\n", emsg.initiatorID); - switch (emsg.eventID) { - case NeutrinoMessages::EVT_CURRENTEPG: - case NeutrinoMessages::EVT_NEXTEPG: - { - CSectionsdClient::CurrentNextInfo *cn = (CSectionsdClient::CurrentNextInfo *) p; - delete [] cn; - p = NULL; - break; - } - default: - if (!dont_delete_p) { - delete[] p; - p = NULL; - } + if (!dont_delete_p) { + delete[] p; + p = NULL; } } }