It's not const in all cases so it doesn't entirely make sense to mark
it const here.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
opi = ofpbuf_pull(&b, offsetof(struct ofp10_packet_in, data));
- pin->packet = opi->data;
+ pin->packet = CONST_CAST(uint8_t *, opi->data);
pin->len = b.size;
match_init_catchall(&pin->flow_metadata);
* On decoding, the 'len' bytes in 'packet' might only be the first part of
* the original packet. ofputil_decode_packet_in() reports the full
* original length of the packet using its 'total_len' output parameter. */
- const void *packet; /* The packet. */
+ void *packet; /* The packet. */
size_t len; /* Length of 'packet' in bytes. */
/* Input port and other metadata for packet. */
void
ofproto_async_msg_free(struct ofproto_async_msg *am)
{
- free(CONST_CAST(void *, am->pin.up.packet));
+ free(am->pin.up.packet);
free(am);
}