summaryrefslogtreecommitdiffstats
path: root/src/rtnl.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-11-06 01:00:24 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-11-09 20:28:24 +0100
commit81092cde12affb71cfa0c02b9510ae1e3d492b80 (patch)
tree20de994cbcaa20c2544891e6f413d5f2dd41f676 /src/rtnl.c
parentac19c1954c3d8505c1612b219f71d7c86cc7fb13 (diff)
src: remove redundant casts
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'src/rtnl.c')
-rw-r--r--src/rtnl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 548dc09..1092c81 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -127,7 +127,7 @@ int rtnl_dump_type(struct rtnl_handle *rtnl_handle, unsigned int type)
req.nlh.nlmsg_seq = rtnl_handle->rtnl_dump = ++(rtnl_handle->rtnl_seq);
req.g.rtgen_family = AF_INET;
- return sendto(rtnl_handle->rtnl_fd, (void*)&req, sizeof(req), 0,
+ return sendto(rtnl_handle->rtnl_fd, &req, sizeof(req), 0,
(struct sockaddr*)&nladdr, sizeof(nladdr));
}
@@ -141,10 +141,10 @@ int rtnl_receive(struct rtnl_handle *rtnl_handle)
struct nlmsghdr *h;
struct msghdr msg = {
- (void *)&nladdr, sizeof(nladdr),
- &iov, 1,
- NULL, 0,
- 0
+ .msg_name = &nladdr,
+ .msg_namelen = sizeof(nladdr),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
};
status = recvmsg(rtnl_handle->rtnl_fd, &msg, 0);
@@ -177,7 +177,7 @@ int rtnl_receive(struct rtnl_handle *rtnl_handle)
return 0;
}
if (h->nlmsg_type == NLMSG_ERROR) {
- struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(h);
+ struct nlmsgerr *err = NLMSG_DATA(h);
if (h->nlmsg_len>=NLMSG_LENGTH(sizeof(struct nlmsgerr)))
errno = -err->error;
rtnl_log(LOG_ERROR, "NLMSG_ERROR, errnp=%d",