@@ -4189,7 +4189,8 @@ parse_ENCAP(char *arg,
return error;
}
/* ofbuf out may have been re-allocated. */
- encap = (struct ofpact_encap *) ((char *)out->data + start_ofs);
+ encap = ALIGNED_CAST(struct ofpact_encap *, (char *)out->data +
+ start_ofs);
encap->n_props = n_props;
ofpact_finish_ENCAP(out, &encap);
return NULL;
@@ -4224,7 +4225,7 @@ format_ed_props(struct ds *s, uint16_t n_props,
format_ed_prop_value(s, prop);
ds_put_cstr(s, ")");
p += ROUND_UP(prop->len, 8);
- prop = (const struct ofpact_ed_prop *) p;
+ prop = ALIGNED_CAST(const struct ofpact_ed_prop *, p);
}
}