[ovs-dev] [PATCH 1/2] ofp-util: Fix type of 'port' param to ofputil_encode_dump_ports_request().

Ben Pfaff blp at nicira.com
Thu Feb 14 07:06:58 UTC 2013


We always use unsigned types for port numbers elsewhere, so use one here
too.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 lib/ofp-util.c |    2 +-
 lib/ofp-util.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index dd6eed8..2716f82 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -4519,7 +4519,7 @@ ofputil_parse_key_value(char **stringp, char **keyp, char **valuep)
  * will be for Open Flow version 'ofp_version'. Returns message
  * as a struct ofpbuf. Returns encoded message on success, NULL on error */
 struct ofpbuf *
-ofputil_encode_dump_ports_request(enum ofp_version ofp_version, int16_t port)
+ofputil_encode_dump_ports_request(enum ofp_version ofp_version, uint16_t port)
 {
     struct ofpbuf *request;
 
diff --git a/lib/ofp-util.h b/lib/ofp-util.h
index 955886d..5698491 100644
--- a/lib/ofp-util.h
+++ b/lib/ofp-util.h
@@ -694,7 +694,7 @@ struct ofputil_port_stats {
 };
 
 struct ofpbuf *ofputil_encode_dump_ports_request(enum ofp_version ofp_version,
-                                                 int16_t port);
+                                                 uint16_t port);
 void ofputil_append_port_stat(struct list *replies,
                               const struct ofputil_port_stats *ops);
 size_t ofputil_count_port_stats(const struct ofp_header *);
-- 
1.7.10.4




More information about the dev mailing list