Acked-by: Simon Horman <ho...@ovn.org>
Signed-off-by: Eelco Chaudron <echau...@redhat.com>
---
 lib/meta-flow.c   |    4 ++--
 lib/ofp-actions.c |    8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/meta-flow.c b/lib/meta-flow.c
index 474344194..aa7cf1fcb 100644
--- a/lib/meta-flow.c
+++ b/lib/meta-flow.c
@@ -2751,8 +2751,8 @@ static char *
 mf_from_integer_string(const struct mf_field *mf, const char *s,
                        uint8_t *valuep, uint8_t *maskp)
 {
+    const char *err_str;
     char *tail;
-    const char *err_str = "";
     int err;
 
     err = parse_int_string(s, valuep, mf->n_bytes, &tail);
@@ -2785,8 +2785,8 @@ syntax_error:
 static char *
 mf_from_packet_type_string(const char *s, ovs_be32 *packet_type)
 {
+    const char *err_str;
     char *tail;
-    const char *err_str = "";
     int err;
 
     if (*s != '(') {
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index d7e5f542a..da7b1dd31 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -4230,10 +4230,12 @@ encode_DELETE_FIELD(const struct ofpact_delete_field 
*delete_field,
                     enum ofp_version ofp_version OVS_UNUSED,
                     struct ofpbuf *out)
 {
-    struct nx_action_delete_field *nadf = put_NXAST_DELETE_FIELD(out);
-    size_t size = out->size;
+    size_t size;
 
-    out->size = size - sizeof nadf->pad;
+    put_NXAST_DELETE_FIELD(out);
+    size = out->size;
+
+    out->size = size - MEMBER_SIZEOF(struct nx_action_delete_field, pad);
     nx_put_mff_header(out, delete_field->field, 0, false);
     out->size = size;
 }

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

Reply via email to