diff options
Diffstat (limited to 'src/platform/tests/test-common.c')
| -rw-r--r-- | src/platform/tests/test-common.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 09a57f87..268a5c92 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -1,4 +1,24 @@ -#include "config.h" +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager audit support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright 2016 Red Hat, Inc. + */ + +#include "nm-default.h" #include <sys/mount.h> #include <sched.h> @@ -39,7 +59,7 @@ add_signal_full (const char *name, NMPlatformSignalChangeType change_type, GCall data->ifindex = ifindex; data->ifname = ifname; - g_assert (data->handler_id >= 0); + g_assert (data->handler_id > 0); return data; } @@ -544,7 +564,7 @@ _ip_address_add (gboolean external_command, guint32 lifetime, guint32 preferred, const char *label, - guint flags) + guint32 flags) { gint64 end_time; @@ -1008,7 +1028,7 @@ nmtstp_ip6_address_add (gboolean external_command, struct in6_addr peer_address, guint32 lifetime, guint32 preferred, - guint flags) + guint32 flags) { _ip_address_add (external_command, FALSE, @@ -1262,7 +1282,7 @@ nmtstp_link_set_updown (gboolean external_command, plink = nm_platform_link_get (NM_PLATFORM_GET, ifindex); g_assert (plink); - if (NM_FLAGS_HAS (plink->flags, IFF_UP) == !!up) + if (NM_FLAGS_HAS (plink->n_ifi_flags, IFF_UP) == !!up) break; /* for internal command, we expect not to reach this line.*/ |