summaryrefslogtreecommitdiffstats
path: root/examples/rtnl-link-set.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rtnl-link-set.c')
-rw-r--r--examples/rtnl-link-set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rtnl-link-set.c b/examples/rtnl-link-set.c
index d7327dd..0a63527 100644
--- a/examples/rtnl-link-set.c
+++ b/examples/rtnl-link-set.c
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
mnl_nlmsg_print(nlh);
- if (mnl_socket_sendto(nl, nlh, mnl_nlmsg_get_len(nlh)) < 0) {
+ if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
perror("mnl_socket_send");
exit(EXIT_FAILURE);
}