mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 13:00:22 +01:00
std-aux/glib-aux: move NM_AUTO_PROTECT_ERRNO() to libnm-std-aux
(cherry picked from commit 2b55408cc7)
This commit is contained in:
parent
db744d2296
commit
309eba1078
2 changed files with 8 additions and 8 deletions
|
|
@ -121,14 +121,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)
|
||||
|
||||
|
|
|
|||
|
|
@ -695,6 +695,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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue