mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 15:50:26 +01:00
platform: cosmetic changes
This commit is contained in:
parent
00b63b975f
commit
afc3c2617a
2 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -111,10 +111,12 @@ test_cleanup_linux_LDADD = $(PLATFORM_LDADD)
|
|||
# correctly.
|
||||
|
||||
@VALGRIND_RULES@
|
||||
TESTS = ./test-link-fake ./test-address-fake ./test-route-fake ./test-cleanup-fake
|
||||
ROOTTESTS = ./test-link-linux ./test-address-linux ./test-route-linux ./test-cleanup-linux
|
||||
USERTESTS = test-link-fake test-address-fake test-route-fake test-cleanup-fake
|
||||
ROOTTESTS = test-link-linux test-address-linux test-route-linux test-cleanup-linux
|
||||
|
||||
# If explicitly enabled, we can run the root tests
|
||||
if RUN_ROOT_TESTS
|
||||
TESTS += $(ROOTTESTS)
|
||||
TESTS = $(USERTESTS) $(ROOTTESTS)
|
||||
else
|
||||
TESTS = $(USERTESTS)
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue