diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 9bc1f0f2bdabcd2d80b88bb2e7895c06e89905f1..92ecf77dc8a8f696108e4e89dbbf3ed72e92f929 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -361,8 +361,9 @@ virNetlinkDumpCommand(struct nl_msg *nl_msg, while (!end) { len = nl_recv(nlhandle, &nladdr, (unsigned char **)&resp, NULL); - + VIR_WARNINGS_NO_CAST_ALIGN for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) { + VIR_WARNINGS_RESET if (msg->nlmsg_type == NLMSG_DONE) end = true;