Message ID | 1516758969-11448-1-git-send-email-huanglili.huang@huawei.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev,v1] ofproto-dpif-xlate: Fix incorrect handling of return value. | expand |
On Wed, Jan 24, 2018 at 09:56:09AM +0800, huanglili wrote: > From: Lili Huang <huanglili.huang@huawei.com> > > The value cookie_offset should be 'size_t' type. > > Signed-off-by: Lili Huang <huanglili.huang@huawei.com> > --- > ofproto/ofproto-dpif-xlate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index 40c04cc..a54ade1 100644 > --- a/ofproto/ofproto-dpif-xlate.c > +++ b/ofproto/ofproto-dpif-xlate.c > @@ -2961,7 +2961,7 @@ compose_sample_action(struct xlate_ctx *ctx, > ctx->xbridge, ctx->xin->flow.in_port.ofp_port); > uint32_t pid = dpif_port_get_pid(ctx->xbridge->dpif, odp_port, > flow_hash_5tuple(&ctx->xin->flow, 0)); > - int cookie_offset = odp_put_userspace_action(pid, cookie, sizeof *cookie, > + size_t cookie_offset = odp_put_userspace_action(pid, cookie, sizeof *cookie, > tunnel_out_port, > include_actions, > ctx->odp_actions); Thanks for the patch. This patch increases line length beyond 79 characters recommended in the coding style document and does not maintain indentation, so I'd prefer to see a version that fixes both of those. Thanks, Ben.
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 40c04cc..a54ade1 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -2961,7 +2961,7 @@ compose_sample_action(struct xlate_ctx *ctx, ctx->xbridge, ctx->xin->flow.in_port.ofp_port); uint32_t pid = dpif_port_get_pid(ctx->xbridge->dpif, odp_port, flow_hash_5tuple(&ctx->xin->flow, 0)); - int cookie_offset = odp_put_userspace_action(pid, cookie, sizeof *cookie, + size_t cookie_offset = odp_put_userspace_action(pid, cookie, sizeof *cookie, tunnel_out_port, include_actions, ctx->odp_actions);