From: Jasper St. Pierre Date: Mon, 21 Nov 2016 23:10:24 +0000 (-0800) Subject: ostree-repo-static-delta-processing: Don't close(-1) X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~43^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fbce60817727a3d48ee41e19a3427d902d15a2bc;p=ostree.git ostree-repo-static-delta-processing: Don't close(-1) Ultimately harmless, but causes somewhat scary strace messages. Closes: #591 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c index 95f9ddba..eabe3925 100644 --- a/src/libostree/ostree-repo-static-delta-processing.c +++ b/src/libostree/ostree-repo-static-delta-processing.c @@ -842,7 +842,7 @@ dispatch_set_read_source (OstreeRepo *repo, gboolean ret = FALSE; guint64 source_offset; - if (state->read_source_fd) + if (state->read_source_fd != -1) { (void) close (state->read_source_fd); state->read_source_fd = -1; @@ -887,7 +887,7 @@ dispatch_unset_read_source (OstreeRepo *repo, goto out; } - if (state->read_source_fd) + if (state->read_source_fd != -1) { (void) close (state->read_source_fd); state->read_source_fd = -1;