mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
util: declare g_autoptr cleanup function to auto-close DIR*
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
24d8968cd0
commit
a61472aad8
@ -271,6 +271,7 @@ int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname)
|
|||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
void virDirClose(DIR *dirp)
|
void virDirClose(DIR *dirp)
|
||||||
ATTRIBUTE_NONNULL(1);
|
ATTRIBUTE_NONNULL(1);
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(DIR, virDirClose);
|
||||||
#define VIR_DIR_CLOSE(dir) virDirClose(dir)
|
#define VIR_DIR_CLOSE(dir) virDirClose(dir)
|
||||||
|
|
||||||
int virFileMakePath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
|
int virFileMakePath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
Loading…
Reference in New Issue
Block a user