Message ID | 1471274479-129913-1-git-send-email-jesse@kernel.org |
---|---|
State | Accepted |
Headers | show |
On Mon, Aug 15, 2016 at 08:21:19AM -0700, Jesse Gross wrote: > XLATE_REPORT_ERROR is a macro that takes struct xlate_ctx as an > argument but also implicitly uses 'ctx' from the local function > scope. This is works with current uses but it really should be > using the argument. > > Signed-off-by: Jesse Gross <jesse@kernel.org> Good catch, thanks! Acked-by: Ben Pfaff <blp@ovn.org>
On Mon, Aug 15, 2016 at 9:22 AM, Ben Pfaff <blp@ovn.org> wrote: > On Mon, Aug 15, 2016 at 08:21:19AM -0700, Jesse Gross wrote: >> XLATE_REPORT_ERROR is a macro that takes struct xlate_ctx as an >> argument but also implicitly uses 'ctx' from the local function >> scope. This is works with current uses but it really should be >> using the argument. >> >> Signed-off-by: Jesse Gross <jesse@kernel.org> > > Good catch, thanks! > > Acked-by: Ben Pfaff <blp@ovn.org> Thanks, I applied this to master.
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index f0a2501..bec599b 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -636,7 +636,7 @@ static struct vlog_rate_limit error_report_rl = VLOG_RATE_LIMIT_INIT(1, 5); \ ds_put_format(&ds, __VA_ARGS__); \ ds_put_cstr(&ds, ": "); \ - flow_format(&ds, &ctx->base_flow); \ + flow_format(&ds, &(CTX)->base_flow); \ VLOG_ERR_RL(&error_report_rl, "%s", ds_cstr(&ds)); \ ds_destroy(&ds); \ } \
XLATE_REPORT_ERROR is a macro that takes struct xlate_ctx as an argument but also implicitly uses 'ctx' from the local function scope. This is works with current uses but it really should be using the argument. Signed-off-by: Jesse Gross <jesse@kernel.org> --- ofproto/ofproto-dpif-xlate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)