[ovs-dev] [PATCH v1] ofproto-dpif-xlate: Fix incorrect handling of return value.

huanglili huanglili.huang at huawei.com
Wed Jan 24 01:56:09 UTC 2018


From: Lili Huang <huanglili.huang at huawei.com>

The value cookie_offset should be 'size_t' type.

Signed-off-by: Lili Huang <huanglili.huang at 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);
-- 
1.9.5.msysgit.1




More information about the dev mailing list