platform: cosmetic changes

This commit is contained in:
Pavel Šimerda
2013-07-27 00:42:10 +02:00
parent 00b63b975f
commit afc3c2617a
2 changed files with 10 additions and 6 deletions

View File

@@ -141,11 +141,13 @@ typedef enum {
static ObjectType
object_type_from_nl_object (const struct nl_object *object)
{
const char *type_str = nl_object_get_type (object);
g_assert (object);
if (!strcmp (nl_object_get_type (object), "route/link"))
if (!strcmp (type_str, "route/link"))
return LINK;
else if (!strcmp (nl_object_get_type (object), "route/addr")) {
else if (!strcmp (type_str, "route/addr")) {
switch (rtnl_addr_get_family ((struct rtnl_addr *) object)) {
case AF_INET:
return IP4_ADDRESS;
@@ -154,7 +156,7 @@ object_type_from_nl_object (const struct nl_object *object)
default:
g_assert_not_reached ();
}
} else if (!strcmp (nl_object_get_type (object), "route/route")) {
} else if (!strcmp (type_str, "route/route")) {
switch (rtnl_route_get_family ((struct rtnl_route *) object)) {
case AF_INET:
return IP4_ROUTE;