From a04bda126c828d998fa86633f638c0e01085823e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 15 Aug 2013 14:21:26 -0400 Subject: [PATCH] core: Use gs_stream_fstat() Just a cleanup. --- src/libostree/ostree-core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 51767538..59779b1c 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; }