summaryrefslogtreecommitdiff
path: root/libnm-util
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-12 14:44:52 +0100
committerThomas Haller <thaller@redhat.com>2016-02-12 15:36:01 +0100
commit2c2d9d2e4cca422a53968cdcb6def420dd77961e (patch)
tree3c05e45abdd2e3442f4b18123a1818b03c999871 /libnm-util
parent97be12b6625e738856814403195b60f7ebc13bfe (diff)
downloadNetworkManager-2c2d9d2e4cca422a53968cdcb6def420dd77961e.tar.gz
build: cleanup default includes
- "gsystem-local-alloc.h" and <gio/gio.h> are already included via "nm-default.h". No need to include them separately. - include "nm-macros-internal.h" via "nm-default.h" and drop all explict includes. - in the modified files, ensure that we always include "config.h" and "nm-default.h" first. As second, include the header file for the current source file (if applicable). Then follow external includes and finally internal nm includes. - include nm headers inside source code files with quotes - internal header files don't need to include default headers. They can savely assume that "nm-default.h" is already included and with it glib, nm-glib.h, nm-macros-internal.h, etc.
Diffstat (limited to 'libnm-util')
-rw-r--r--libnm-util/nm-setting-8021x.c5
-rw-r--r--libnm-util/nm-utils.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index 30febf9ce1..00138ace9c 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -22,17 +22,18 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-setting-8021x.h"
+
#include <string.h>
#include <dbus/dbus-glib.h>
-#include "nm-setting-8021x.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
#include "crypto.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
-#include "nm-macros-internal.h"
/**
* SECTION:nm-setting-8021x
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index 1659a1a3c9..5f5dc1f663 100644
--- a/libnm-util/nm-utils.c
+++ b/libnm-util/nm-utils.c
@@ -21,6 +21,9 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-utils.h"
+
#include <string.h>
#include <stdlib.h>
#include <netinet/ether.h>
@@ -29,14 +32,11 @@
#include <libintl.h>
#include <gmodule.h>
-#include "nm-default.h"
#include "nm-gvaluearray-compat.h"
-#include "nm-utils.h"
#include "nm-utils-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-setting-private.h"
#include "crypto.h"
-#include "nm-macros-internal.h"
/* Embed the commit id in the build binary */
static const char *const __nm_git_sha = STRLEN (NM_GIT_SHA) > 0 ? "NM_GIT_SHA:"NM_GIT_SHA : "";