diff options
author | Colin Walters <walters@verbum.org> | 2017-10-16 14:09:39 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2017-10-16 18:06:53 -0400 |
commit | 771d7a01d1104bbb8240cb29393314c7a4a69c4d (patch) | |
tree | aac733372fe9e87fdcae2379be38a5087716f941 /glnx-dirfd.c | |
parent | e627524af9ae499c1edd04795442f8bdb05b5223 (diff) | |
download | libglnx-771d7a01d1104bbb8240cb29393314c7a4a69c4d.tar.gz |
tree-wide: Use glnx_autofd and glnx_close_fd()
Port to `glnx_autofd` tree wide, and add one missed `glnx_close_fd()` use in the
tmpfile code.
Diffstat (limited to 'glnx-dirfd.c')
-rw-r--r-- | glnx-dirfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glnx-dirfd.c b/glnx-dirfd.c index e6c3319..e0c244c 100644 --- a/glnx-dirfd.c +++ b/glnx-dirfd.c @@ -99,7 +99,7 @@ glnx_dirfd_iterator_init_at (int dfd, GLnxDirFdIterator *out_dfd_iter, GError **error) { - glnx_fd_close int fd = -1; + glnx_autofd int fd = -1; if (!glnx_opendirat (dfd, path, follow, &fd, error)) return FALSE; @@ -326,7 +326,7 @@ glnx_mkdtempat (int dfd, const char *tmpl, int mode, } /* And open it */ - glnx_fd_close int ret_dfd = -1; + glnx_autofd int ret_dfd = -1; if (!glnx_opendirat (dfd, path, FALSE, &ret_dfd, error)) { /* If we fail to open, let's try to clean up */ |