X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Frtnetlink-link.c;h=1c12562c5af7437cc24d32ec46b49e719b96854a;hb=cfc50ae514f805dcd9c14589f21158185424daf6;hp=459e4855995b4368c9caba2ae1f617a11b5c0442;hpb=098d85b3e3b5a7c4e8b872bf3f9ff05058b84c68;p=sliver-openvswitch.git diff --git a/lib/rtnetlink-link.c b/lib/rtnetlink-link.c index 459e48559..1c12562c5 100644 --- a/lib/rtnetlink-link.c +++ b/lib/rtnetlink-link.c @@ -58,9 +58,8 @@ rtnetlink_link_parse(struct ofpbuf *buf, const struct nlmsghdr *nlmsg; const struct ifinfomsg *ifinfo; - nlmsg = buf->data; - ifinfo = ((const struct ifinfomsg *) - ((const char *) buf->data + NLMSG_HDRLEN)); + nlmsg = ofpbuf_data(buf); + ifinfo = ofpbuf_at(buf, NLMSG_HDRLEN, sizeof *ifinfo); change->nlmsg_type = nlmsg->nlmsg_type; change->ifi_index = ifinfo->ifi_index;