From: Davin McCall Date: Mon, 20 Jun 2016 22:12:45 +0000 (+0100) Subject: Scratch one TODO: default case in switch can't occur, function is only X-Git-Tag: v0.04~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a7aa26c8e834d0dd4bd5b8c06c3d739b9acb3115;p=oweals%2Fdinit.git 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. --- 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) };