[Spice-devel] [PATCH 1/5] client: don't fall through for CONTROLLER_SEND_CAD

Alon Levy alevy at redhat.com
Mon Feb 27 11:03:58 PST 2012


On Mon, Feb 27, 2012 at 10:58:27AM +0100, Christophe Fergeau wrote:
> On Sun, Feb 26, 2012 at 05:43:31PM +0100, Alon Levy wrote:
> > ---
> >  client/controller.cpp |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/client/controller.cpp b/client/controller.cpp
> > index 91c0021..93805bc 100644
> > --- a/client/controller.cpp
> > +++ b/client/controller.cpp
> > @@ -335,6 +335,8 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr)
> >          _handler->delete_menu();
> >          break;
> >      case CONTROLLER_SEND_CAD:
> > +        LOG_ERROR("TODO: CONTROLLER_SEND_CAD is not impelemented");
> 
> "implemented"
> 
> Falling through may have been intentional, an error is logged and the
> message isn't that bad. false is returned in the default: block, and with
> your patch, true will be returned, shouldn't it be false as well?

Right you are.

> 
> Christophe
> 
> > +        break;
> >      default:
> >          LOG_ERROR("Ignoring an unknown controller message %u", hdr->id);
> >          return false;
> > -- 
> > 1.7.9.1
> > 
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel




More information about the Spice-devel mailing list