ostree-repo-static-delta-processing: Don't close(-1)

Ultimately harmless, but causes somewhat scary strace messages.

Closes: #591
Approved by: cgwalters
This commit is contained in:
Jasper St. Pierre 2016-11-21 15:10:24 -08:00 committed by Atomic Bot
parent a8f5c20209
commit fbce608177

View File

@ -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;