@@ -608,6 +608,8 @@ struct rpc_state {
608
608
unsigned flush_read_but_not_sent : 1 ;
609
609
};
610
610
611
+ #define RPC_STATE_INIT { 0 }
612
+
611
613
/*
612
614
* Appends the result of reading from rpc->out to the string represented by
613
615
* 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)
1161
1163
static int fetch_git (struct discovery * heads ,
1162
1164
int nr_heads , struct ref * * to_fetch )
1163
1165
{
1164
- struct rpc_state rpc ;
1166
+ struct rpc_state rpc = RPC_STATE_INIT ;
1165
1167
struct strbuf preamble = STRBUF_INIT ;
1166
1168
int i , err ;
1167
1169
struct strvec args = STRVEC_INIT ;
@@ -1307,7 +1309,7 @@ static int push_dav(int nr_spec, const char **specs)
1307
1309
1308
1310
static int push_git (struct discovery * heads , int nr_spec , const char * * specs )
1309
1311
{
1310
- struct rpc_state rpc ;
1312
+ struct rpc_state rpc = RPC_STATE_INIT ;
1311
1313
int i , err ;
1312
1314
struct strvec args ;
1313
1315
struct string_list_item * cas_option ;
@@ -1406,7 +1408,7 @@ static void parse_push(struct strbuf *buf)
1406
1408
static int stateless_connect (const char * service_name )
1407
1409
{
1408
1410
struct discovery * discover ;
1409
- struct rpc_state rpc ;
1411
+ struct rpc_state rpc = RPC_STATE_INIT ;
1410
1412
struct strbuf buf = STRBUF_INIT ;
1411
1413
const char * accept_language ;
1412
1414
0 commit comments