From: Ben Pfaff Date: Fri, 9 Apr 2010 21:04:10 +0000 (-0700) Subject: ofproto: Maximum value of "int" is INT_MAX, not UINT32_MAX. X-Git-Tag: v1.0.0~158 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=392804e7ee2753cea831503fbdbafc2d7780862a;p=sliver-openvswitch.git ofproto: Maximum value of "int" is INT_MAX, not UINT32_MAX. This bug seems to be dormant at the moment, since the -1 gets passed through unchanged to do_send_packet_in() and then to make_packet_in() and then gets converted to SIZE_MAX as part of the MIN invocation in that function. It is still better to fix it. Reported-by: Jean Tourrilhes --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 0f4ba6844..83dc99d82 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3702,7 +3702,7 @@ send_packet_in_miss(struct ofpbuf *packet, void *p_) ? pktbuf_get_null() : pktbuf_save(pb, &payload, msg->port)); int send_len = (buffer_id != UINT32_MAX ? ofconn->miss_send_len - : UINT32_MAX); + : INT_MAX); do_send_packet_in(ofconn, buffer_id, packet, send_len); } }