summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-06-25 09:47:38 +0200
committerThomas Haller <thaller@redhat.com>2021-07-01 11:04:22 +0200
commit2b55408cc79831860a6b6585b2d4d8ac4f6cd20f (patch)
tree7176af91320357201b1d6a07936d302350f0f5c9
parent62141eb938c6006aea080fd9cc3da37e3288d005 (diff)
downloadNetworkManager-2b55408cc79831860a6b6585b2d4d8ac4f6cd20f.tar.gz
std-aux/glib-aux: move NM_AUTO_PROTECT_ERRNO() to libnm-std-aux
-rw-r--r--src/libnm-glib-aux/nm-macros-internal.h8
-rw-r--r--src/libnm-std-aux/nm-std-aux.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libnm-glib-aux/nm-macros-internal.h b/src/libnm-glib-aux/nm-macros-internal.h
index e11742a15b..f838c56eed 100644
--- a/src/libnm-glib-aux/nm-macros-internal.h
+++ b/src/libnm-glib-aux/nm-macros-internal.h
@@ -122,14 +122,6 @@ _nm_auto_free_gstring(GString **str)
}
#define nm_auto_free_gstring nm_auto(_nm_auto_free_gstring)
-static inline void
-_nm_auto_protect_errno(const int *p_saved_errno)
-{
- errno = *p_saved_errno;
-}
-#define NM_AUTO_PROTECT_ERRNO(errsv_saved) \
- nm_auto(_nm_auto_protect_errno) _nm_unused const int errsv_saved = (errno)
-
NM_AUTO_DEFINE_FCN0(GSource *, _nm_auto_unref_gsource, g_source_unref);
#define nm_auto_unref_gsource nm_auto(_nm_auto_unref_gsource)
diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h
index 5bcb311d3a..074c8a0b25 100644
--- a/src/libnm-std-aux/nm-std-aux.h
+++ b/src/libnm-std-aux/nm-std-aux.h
@@ -821,6 +821,14 @@ nm_close(int fd)
NM_AUTO_DEFINE_FCN_VOID0(void *, _nm_auto_free_impl, free);
#define nm_auto_free nm_auto(_nm_auto_free_impl)
+static inline void
+_nm_auto_protect_errno(const int *p_saved_errno)
+{
+ errno = *p_saved_errno;
+}
+#define NM_AUTO_PROTECT_ERRNO(errsv_saved) \
+ nm_auto(_nm_auto_protect_errno) _nm_unused const int errsv_saved = (errno)
+
/*****************************************************************************/
static inline void