[ostree] core: Use gs_stream_fstat()



commit a04bda126c828d998fa86633f638c0e01085823e
Author: Colin Walters <walters verbum org>
Date:   Thu Aug 15 14:21:26 2013 -0400

    core: Use gs_stream_fstat()
    
    Just a cleanup.

 src/libostree/ostree-core.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 5176753..59779b1 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -714,11 +714,8 @@ ostree_content_file_parse (gboolean                compressed,
       if (!file_input)
         goto out;
       
-      if (fstat (g_file_descriptor_based_get_fd ((GFileDescriptorBased*)file_input), &stbuf) < 0)
-        {
-          ot_util_set_error_from_errno (error, errno);
-          goto out;
-        }
+      if (!gs_stream_fstat ((GFileDescriptorBased*)file_input, &stbuf, cancellable, error))
+        goto out;
 
       length = stbuf.st_size;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]