]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ofp-util: Remove 'const' from struct ofputil_packet_in's 'packet' member.
authorBen Pfaff <blp@ovn.org>
Wed, 17 Feb 2016 21:14:26 +0000 (13:14 -0800)
committerBen Pfaff <blp@ovn.org>
Sat, 20 Feb 2016 00:15:44 +0000 (16:15 -0800)
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>
lib/ofp-util.c
lib/ofp-util.h
ofproto/connmgr.c

index 23f7eda28f61853a8131b72df2a5c0ebed64fbf0..d0579156f7f8ab42d057b69c82dbef6c6f780a9c 100644 (file)
@@ -3341,7 +3341,7 @@ ofputil_decode_packet_in(const struct ofp_header *oh,
 
         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);
index 866e1bc3892f1b5f9780dd7cba280a3578e69de3..19bfc4b4037df2ac85ccc7a0c7c7e507ef544da8 100644 (file)
@@ -426,7 +426,7 @@ struct ofputil_packet_in {
      * 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. */
index d4f64b2237572d1386bde960e51dd228d3586dd7..cc947f0d0e44106e5ee6855b09b33da821c3cc7b 100644 (file)
@@ -2247,6 +2247,6 @@ ofmonitor_wait(struct connmgr *mgr)
 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);
 }