ofpbuf_const_initializer takes only two parameters see:
https://github.com/openvswitch/ovs/blob/master/include/openvswitch/ofpbuf.h#L96
the compiler only gives the following warning:
lib/netdev-windows.c(229) : warning C4020: 'ofpbuf_const_initializer' :
too many actual parameters
which in result will put junk data into "ofpbuf b".
This patch fixes the initialization.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
netdev_windows_info_init(info);
- struct ofpbuf b = ofpbuf_const_initializer(&b, buf->data, buf->size);
+ struct ofpbuf b = ofpbuf_const_initializer(buf->data, buf->size);
struct nlmsghdr *nlmsg = ofpbuf_try_pull(&b, sizeof *nlmsg);
struct genlmsghdr *genl = ofpbuf_try_pull(&b, sizeof *genl);
struct ovs_header *ovs_header = ofpbuf_try_pull(&b, sizeof *ovs_header);