diff options
author | Thomas Haller <thaller@redhat.com> | 2014-12-17 10:38:46 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-12-18 17:38:35 +0100 |
commit | dfb25b6c4ad03098a28fdb087f31cc014fc357d5 (patch) | |
tree | 8352c6d9ee558e15548a4097fcf4f63d06e89304 | |
parent | ca399f00c411f526d87681a196ec2002c31b3032 (diff) | |
download | NetworkManager-dfb25b6c4ad03098a28fdb087f31cc014fc357d5.tar.gz |
all: move STRLEN() macro to global header nm-utils-internal.h
https://bugzilla.gnome.org/show_bug.cgi?id=741651
(cherry picked from commit 422fbf48b94d51d0a874e29b4f82726b1bca0c92)
-rw-r--r-- | include/nm-utils-internal.h | 3 | ||||
-rw-r--r-- | src/NetworkManagerUtils.h | 3 | ||||
-rw-r--r-- | src/dhcp-manager/nm-dhcp-dhclient-utils.c | 1 | ||||
-rw-r--r-- | src/dhcp-manager/tests/test-dhcp-dhclient.c | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/include/nm-utils-internal.h b/include/nm-utils-internal.h index 69ab8391be..c002b6c1ef 100644 --- a/include/nm-utils-internal.h +++ b/include/nm-utils-internal.h @@ -82,6 +82,9 @@ /********************************************************/ +/* macro to return strlen() of a compile time string. */ +#define STRLEN(str) ( sizeof ("" str) - 1 ) + #define NM_IN_SET(x, y, ...) \ ({ \ const typeof(y) _y = (y); \ diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h index a0dab49267..40315c6efc 100644 --- a/src/NetworkManagerUtils.h +++ b/src/NetworkManagerUtils.h @@ -51,9 +51,6 @@ nm_utils_ip6_route_metric_normalize (guint32 metric) int nm_spawn_process (const char *args); -/* macro to return strlen() of a compile time string. */ -#define STRLEN(str) ( sizeof ("" str) - 1 ) - /* check if @flags has exactly one flag (@check) set. You should call this * only with @check being a compile time constant and a power of two. */ #define NM_FLAGS_HAS(flags, check) \ diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c index ec40bbd296..46e8e0b8dc 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient-utils.c +++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c @@ -32,6 +32,7 @@ #include "nm-platform.h" #include "NetworkManagerUtils.h" #include "gsystem-local-alloc.h" +#include "nm-utils-internal.h" #define CLIENTID_TAG "send dhcp-client-identifier" diff --git a/src/dhcp-manager/tests/test-dhcp-dhclient.c b/src/dhcp-manager/tests/test-dhcp-dhclient.c index 5d360f54e4..4f7e96afde 100644 --- a/src/dhcp-manager/tests/test-dhcp-dhclient.c +++ b/src/dhcp-manager/tests/test-dhcp-dhclient.c @@ -32,6 +32,7 @@ #include "nm-utils.h" #include "nm-ip4-config.h" #include "nm-platform.h" +#include "nm-utils-internal.h" #define DEBUG 1 |