From a7aa26c8e834d0dd4bd5b8c06c3d739b9acb3115 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 20 Jun 2016 23:12:45 +0100 Subject: [PATCH] Scratch one TODO: default case in switch can't occur, function is only called once command has been established, therefore there's no need to handle other cases. --- src/control.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/control.cc b/src/control.cc index 5cc8798..a887d27 100644 --- a/src/control.cc +++ b/src/control.cc @@ -156,6 +156,7 @@ bool ControlConn::processStartStop(int pktType) } else { bool already_there = false; + switch (pktType) { case DINIT_CP_STARTSERVICE: // start service, mark as required @@ -186,9 +187,6 @@ bool ControlConn::processStartStop(int pktType) service_set->processQueues(false); already_there = service->getState() == ServiceState::STOPPED; break; - default: - // TODO return an error - break; } char ack_buf[] = { (char)(already_there ? DINIT_RP_ALREADYSS : DINIT_RP_ACK) }; -- 2.25.1