datapath: Avoid possibility of negative 'n_ports' in struct odp_portvec.
authorBen Pfaff <blp@nicira.com>
Thu, 13 May 2010 18:04:56 +0000 (11:04 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 13 May 2010 22:29:47 +0000 (15:29 -0700)
'n_ports' should never be negative so it's better to use an unsigned type.

Suggested-by: Jesse Gross <jesse@nicira.com>
include/openvswitch/datapath-protocol.h

index 1c2dba9..0e8d5c9 100644 (file)
@@ -181,7 +181,7 @@ struct odp_port {
 
 struct odp_portvec {
     struct odp_port *ports;
-    int n_ports;
+    __u32 n_ports;
 };
 
 struct odp_port_group {