ofproto: Inline trivial functions.
[sliver-openvswitch.git] / lib / rtnetlink-link.c
index 459e485..1c12562 100644 (file)
@@ -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;