summary refs log tree commit diff
path: root/src/platform/tests/test-common.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-03-01 16:55:22 +0100
committerMichael Biebl <biebl@debian.org>2016-03-01 16:55:22 +0100
commitc2de0d98ba39e0a1a970d066fd19be786092f376 (patch)
tree3838363c06a6019db6cf1f882ea34ebded63c38b /src/platform/tests/test-common.c
parent494f296a3baab08522617b24b1f126d8f9a17502 (diff)
Imported Upstream version 1.1.91 upstream/1.1.91
Diffstat (limited to 'src/platform/tests/test-common.c')
-rw-r--r--src/platform/tests/test-common.c30
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.*/