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:
Colin Walters authored and Atomic Bot committed 2016-06-13 14:58:55 +00:00
1 parent 14ff4f94fb
commit 7847bc7394
5 files changed
+14 -44

No files matched your search

+1 -3
View File
@@ -107,7 +107,7 @@ _ostree_linuxfs_alter_immutable_flag (GFile *path,
GError **error)
{
gboolean ret = FALSE;
int fd = -1;
glnx_fd_close int fd = -1;
if (g_cancellable_set_error_if_cancelled (cancellable, error))
return FALSE;
@@ -129,7 +129,5 @@ _ostree_linuxfs_alter_immutable_flag (GFile *path,
ret = TRUE;
out:
if (fd != -1)
(void) close (fd);
return ret;
}