Skip to content

Commit b85e8d7

Browse files
committed
PREP??? give initializer to rpc_state
1 parent c81fcfe commit b85e8d7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

remote-curl.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ struct rpc_state {
608608
unsigned flush_read_but_not_sent : 1;
609609
};
610610

611+
#define RPC_STATE_INIT { 0 }
612+
611613
/*
612614
* Appends the result of reading from rpc->out to the string represented by
613615
* rpc->buf and rpc->len if there is enough space. Returns 1 if there was
@@ -1161,7 +1163,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
11611163
static int fetch_git(struct discovery *heads,
11621164
int nr_heads, struct ref **to_fetch)
11631165
{
1164-
struct rpc_state rpc;
1166+
struct rpc_state rpc = RPC_STATE_INIT;
11651167
struct strbuf preamble = STRBUF_INIT;
11661168
int i, err;
11671169
struct strvec args = STRVEC_INIT;
@@ -1307,7 +1309,7 @@ static int push_dav(int nr_spec, const char **specs)
13071309

13081310
static int push_git(struct discovery *heads, int nr_spec, const char **specs)
13091311
{
1310-
struct rpc_state rpc;
1312+
struct rpc_state rpc = RPC_STATE_INIT;
13111313
int i, err;
13121314
struct strvec args;
13131315
struct string_list_item *cas_option;
@@ -1406,7 +1408,7 @@ static void parse_push(struct strbuf *buf)
14061408
static int stateless_connect(const char *service_name)
14071409
{
14081410
struct discovery *discover;
1409-
struct rpc_state rpc;
1411+
struct rpc_state rpc = RPC_STATE_INIT;
14101412
struct strbuf buf = STRBUF_INIT;
14111413
const char *accept_language;
14121414

0 commit comments

Comments
 (0)