[ovs-dev] [netlink flows v2 05/12] dpif-netdev: Add missing 'const' qualifiers to function parameters.
Ben Pfaff
blp at nicira.com
Tue Dec 28 22:33:00 UTC 2010
These functions don't modify their flow key arguments but the prototypes
implied that they did.
---
lib/dpif-netdev.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 74cd0ca..a52accc 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -1060,7 +1060,7 @@ is_ip(const struct ofpbuf *packet, const struct flow *key)
}
static void
-dp_netdev_set_nw_addr(struct ofpbuf *packet, struct flow *key,
+dp_netdev_set_nw_addr(struct ofpbuf *packet, const struct flow *key,
const struct nlattr *a)
{
if (is_ip(packet, key)) {
@@ -1088,7 +1088,8 @@ dp_netdev_set_nw_addr(struct ofpbuf *packet, struct flow *key,
}
static void
-dp_netdev_set_nw_tos(struct ofpbuf *packet, struct flow *key, uint8_t nw_tos)
+dp_netdev_set_nw_tos(struct ofpbuf *packet, const struct flow *key,
+ uint8_t nw_tos)
{
if (is_ip(packet, key)) {
struct ip_header *nh = packet->l3;
@@ -1104,7 +1105,7 @@ dp_netdev_set_nw_tos(struct ofpbuf *packet, struct flow *key, uint8_t nw_tos)
}
static void
-dp_netdev_set_tp_port(struct ofpbuf *packet, struct flow *key,
+dp_netdev_set_tp_port(struct ofpbuf *packet, const struct flow *key,
const struct nlattr *a)
{
if (is_ip(packet, key)) {
--
1.7.1
More information about the dev
mailing list