static-delta: Initialize read_source_fd to -1
If not, we'll get ESPIPE when seeking on fd 0. Closes: #260 Approved by: cgwalters
This commit is contained in:
parent
a08b7765b7
commit
b4b26907c8
|
|
@ -106,6 +106,12 @@ OPPROTO(close)
|
||||||
OPPROTO(bspatch)
|
OPPROTO(bspatch)
|
||||||
#undef OPPROTO
|
#undef OPPROTO
|
||||||
|
|
||||||
|
static void
|
||||||
|
static_delta_execution_state_init (StaticDeltaExecutionState *state)
|
||||||
|
{
|
||||||
|
state->read_source_fd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
read_varuint64 (StaticDeltaExecutionState *state,
|
read_varuint64 (StaticDeltaExecutionState *state,
|
||||||
guint64 *out_value,
|
guint64 *out_value,
|
||||||
|
|
@ -195,6 +201,8 @@ _ostree_static_delta_part_execute (OstreeRepo *repo,
|
||||||
StaticDeltaExecutionState *state = &statedata;
|
StaticDeltaExecutionState *state = &statedata;
|
||||||
guint n_executed = 0;
|
guint n_executed = 0;
|
||||||
|
|
||||||
|
static_delta_execution_state_init (&statedata);
|
||||||
|
|
||||||
state->repo = repo;
|
state->repo = repo;
|
||||||
state->async_error = error;
|
state->async_error = error;
|
||||||
state->trusted = trusted;
|
state->trusted = trusted;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue