lib: Port some manual close() cleanups to be glnx_fd_close
Just noticed this while reading some code, we didn't have many manual `out: close()` bits left, this pushes us over the edge to autocleanup almost everywhere. Closes: #332 Approved by: jlebon
This commit is contained in:
1 parent
14ff4f94fb
commit
7847bc7394
5 files changed
+14
-44
No files matched your search
@@ -632,7 +632,7 @@ checkout_tree_at (OstreeRepo *self,
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
gboolean did_exist = FALSE;
|
||||
int destination_dfd = -1;
|
||||
glnx_fd_close int destination_dfd = -1;
|
||||
int res;
|
||||
g_autoptr(GVariant) xattrs = NULL;
|
||||
g_autoptr(GFileEnumerator) dir_enum = NULL;
|
||||
@@ -779,8 +779,6 @@ checkout_tree_at (OstreeRepo *self,
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (destination_dfd != -1)
|
||||
(void) close (destination_dfd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user