"dev" <dev-boun...@openvswitch.org> wrote on 08/08/2016 11:14:15 AM:
> From: Ben Pfaff <b...@ovn.org> > To: dev@openvswitch.org > Cc: Ben Pfaff <b...@ovn.org> > Date: 08/08/2016 11:15 AM > Subject: [ovs-dev] [PATCH v2 04/21] expr: Tolerate having no macros. > Sent by: "dev" <dev-boun...@openvswitch.org> > > A null set of macros seems reasonable, so tolerate it. > > Signed-off-by: Ben Pfaff <b...@ovn.org> > --- > ovn/lib/expr.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c > index cb61b5d..050e694 100644 > --- a/ovn/lib/expr.c > +++ b/ovn/lib/expr.c > @@ -735,7 +735,9 @@ parse_macros(struct expr_context *ctx, struct > expr_constant_set *cs, > size_t *allocated_values) > { > struct expr_constant_set *addr_set > - = shash_find_data(ctx->macros, ctx->lexer->token.s); > + = (ctx->macros > + ? shash_find_data(ctx->macros, ctx->lexer->token.s) > + : NULL); > if (!addr_set) { > expr_syntax_error(ctx, "expecting address set name."); > return false; > -- No surprises with this one, so... Acked-by: Ryan Moats <rmo...@us.ibm.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev