On Mon, 23 Jul 2018 15:36:28 -0700
Ben Pfaff <b...@ovn.org> wrote:

> On Tue, Jul 17, 2018 at 03:34:12PM +0200, Jakub Sitnicki wrote:
> > Instead of dying let the main loop handle the error.
> > This will allow us to report errors when running in daemon mode.
> > 
> > This is a result of applying the following semantic patch:
> > 
> > @@
> > identifier F;
> > identifier C;
> > identifier E;
> > @@
> >   static void F(struct ctl_context *C) {
> > <...
> >       if (E) {
> > -         ctl_fatal("%s", E);
> > +         C->error = E;
> > +         return;
> >       }  
> > ...>  
> >   }
> > 
> > Signed-off-by: Jakub Sitnicki <j...@redhat.com>  
> 
> It's too bad that this generates code like this:
> 
>          char *error = ls_by_name_or_uuid(ctx, ctx->argv[1], false, &ls);
>          if (error) {
>             ctx->error = error;
>             return;
>          }
> 
> instead of the simpler:
> 
>          ctx->error = ls_by_name_or_uuid(ctx, ctx->argv[1], false, &ls);
>          if (ctx->error) {
>             return;
>          }
> 
> Oh well.

Let me see if I can come up with a semantic patch that corrects that.

-Jakub
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to