diff mbox

[ovs-dev,v2,11/22] netlink: Simplify nl_msg_start_nested().

Message ID 1488331058-40038-12-git-send-email-jarno@ovn.org
State Superseded
Headers show

Commit Message

Jarno Rajahalme March 1, 2017, 1:17 a.m. UTC
Since there is no data to copy nl_msg_put_unspec_uninit() may be used
directly, rather than via nl_msg_put_unspec().

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
---
 lib/netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Stringer March 3, 2017, 5:19 p.m. UTC | #1
On 28 February 2017 at 17:17, Jarno Rajahalme <jarno@ovn.org> wrote:
> Since there is no data to copy nl_msg_put_unspec_uninit() may be used
> directly, rather than via nl_msg_put_unspec().
>
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>

Acked-by: Joe Stringer <joe@ovn.org>
diff mbox

Patch

diff --git a/lib/netlink.c b/lib/netlink.c
index ad7d35a..f253f80 100644
--- a/lib/netlink.c
+++ b/lib/netlink.c
@@ -454,7 +454,7 @@  size_t
 nl_msg_start_nested(struct ofpbuf *msg, uint16_t type)
 {
     size_t offset = msg->size;
-    nl_msg_put_unspec(msg, type, NULL, 0);
+    nl_msg_put_unspec_uninit(msg, type, 0);
     return offset;
 }