summaryrefslogtreecommitdiff
path: root/src/rtnl.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-08 19:11:39 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-08-08 19:11:39 -0700
commit5640935cc685a7aa2bc8b6230d48f71d9ca0fdcc (patch)
tree0897485e0a1dce0f27bd575e8dfe9f9ec662e63c /src/rtnl.c
parent809a75bba04795994120f0bfdf2853814f775fd0 (diff)
downloadconnman-5640935cc685a7aa2bc8b6230d48f71d9ca0fdcc.tar.gz
connman-5640935cc685a7aa2bc8b6230d48f71d9ca0fdcc.tar.bz2
connman-5640935cc685a7aa2bc8b6230d48f71d9ca0fdcc.zip
Fix some coding style in RTNL message handling
Diffstat (limited to 'src/rtnl.c')
-rw-r--r--src/rtnl.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index bec9674d..679a9dfe 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -509,9 +509,7 @@ static void rtnl_link(struct nlmsghdr *hdr)
static void rtnl_newlink(struct nlmsghdr *hdr)
{
- struct ifinfomsg *msg;
-
- msg = (struct ifinfomsg *) NLMSG_DATA(hdr);
+ struct ifinfomsg *msg = (struct ifinfomsg *) NLMSG_DATA(hdr);
DBG("ifi_type %d ifi_index %d ifi_flags 0x%04x ifi_change 0x%04x",
msg->ifi_type, msg->ifi_index,
@@ -525,9 +523,7 @@ static void rtnl_newlink(struct nlmsghdr *hdr)
static void rtnl_dellink(struct nlmsghdr *hdr)
{
- struct ifinfomsg *msg;
-
- msg = (struct ifinfomsg *) NLMSG_DATA(hdr);
+ struct ifinfomsg *msg = (struct ifinfomsg *) NLMSG_DATA(hdr);
DBG("ifi_type %d ifi_index %d ifi_flags 0x%04x ifi_change 0x%04x",
msg->ifi_type, msg->ifi_index,
@@ -598,9 +594,7 @@ static void rtnl_newaddr(struct nlmsghdr *hdr)
static void rtnl_deladdr(struct nlmsghdr *hdr)
{
- struct ifaddrmsg *msg;
-
- msg = (struct ifaddrmsg *) NLMSG_DATA(hdr);
+ struct ifaddrmsg *msg = (struct ifaddrmsg *) NLMSG_DATA(hdr);
DBG("ifa_family %d ifa_prefixlen %d ifa_index %d",
msg->ifa_family, msg->ifa_prefixlen, msg->ifa_index);