Scratch one TODO: default case in switch can't occur, function is only
authorDavin McCall <davmac@davmac.org>
Mon, 20 Jun 2016 22:12:45 +0000 (23:12 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 20 Jun 2016 22:12:45 +0000 (23:12 +0100)
called once command has been established, therefore there's no need
to handle other cases.

src/control.cc

index 5cc8798caea449421fa299bd0463a4514a49da9f..a887d271c85fabf9b1dd42ae7b25bd10c5732e44 100644 (file)
@@ -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) };