From: Ben Pfaff Date: Thu, 13 May 2010 18:04:56 +0000 (-0700) Subject: datapath: Avoid possibility of negative 'n_ports' in struct odp_portvec. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1da3c6a0500a6dae270c918d5c85c60682ba6036;p=openvswitch datapath: Avoid possibility of negative 'n_ports' in struct odp_portvec. 'n_ports' should never be negative so it's better to use an unsigned type. Suggested-by: Jesse Gross --- diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 1c2dba9b..0e8d5c9e 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -181,7 +181,7 @@ struct odp_port { struct odp_portvec { struct odp_port *ports; - int n_ports; + __u32 n_ports; }; struct odp_port_group {