diff options
author | Ken-ichirou MATSUZAWA <chamaken@gmail.com> | 2013-12-07 20:24:40 +0900 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2013-12-07 12:53:46 +0100 |
commit | c766735e6937bfc0acdde29336b6d8b6a5884ec5 (patch) | |
tree | f76e2e220b99efb2eb21cb3b4196bd97263324db /examples | |
parent | 73b9805968e430d4328f5eca78574b6c0987f2cf (diff) | |
download | libmnl-c766735e6937bfc0acdde29336b6d8b6a5884ec5.tar.gz libmnl-c766735e6937bfc0acdde29336b6d8b6a5884ec5.zip |
examples: use mnl_nlmsg_get_payload()
not increment (nlmsghdr) pointer
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/netfilter/nfct-create-batch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/netfilter/nfct-create-batch.c b/examples/netfilter/nfct-create-batch.c index 40cd2f6..4675789 100644 --- a/examples/netfilter/nfct-create-batch.c +++ b/examples/netfilter/nfct-create-batch.c @@ -67,7 +67,7 @@ static void put_msg(char *buf, uint16_t i, int seq) static int cb_err(const struct nlmsghdr *nlh, void *data) { - struct nlmsgerr *err = (void *)(nlh + 1); + struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh); if (err->error != 0) printf("message with seq %u has failed: %s\n", nlh->nlmsg_seq, strerror(-err->error)); |