X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fofp-util.c;fp=lib%2Fofp-util.c;h=5703f8cc03cbf465514ca9d7427f6712d56a4a69;hb=74c4b9c1c24b6579dcaa127268530af9bffa29b4;hp=ae54477ee567f50317db0ea6ac1bb3c0d1ac6664;hpb=6694e498efc445ec24ef1715ae03ebb43daa678f;p=openvswitch diff --git a/lib/ofp-util.c b/lib/ofp-util.c index ae54477e..5703f8cc 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1181,7 +1181,7 @@ ofputil_encode_hello(uint32_t allowed_versions) struct ofp_hello_elem_header *oheh; uint16_t map_len; - map_len = sizeof(uint32_t) / CHAR_BIT; + map_len = sizeof allowed_versions; oheh = ofpbuf_put_zeros(msg, ROUND_UP(map_len + sizeof *oheh, 8)); oheh->type = htons(OFPHET_VERSIONBITMAP); oheh->length = htons(map_len + sizeof *oheh);