Revert "initialize variables used in conditional jumps"
This reverts commit f89b38947a
.
This commit is contained in:
parent
104017df7a
commit
f5f35bd148
4 changed files with 11 additions and 11 deletions
|
@ -59,14 +59,14 @@ static int info_node(int fd, const char *item) {
|
|||
char via[4096];
|
||||
char nexthop[4096];
|
||||
int code, req, cipher, digest, maclength, compression, distance;
|
||||
short int pmtu = -1, minmtu = 0, maxmtu = 0;
|
||||
unsigned int options = -1;
|
||||
short int pmtu, minmtu, maxmtu;
|
||||
unsigned int options;
|
||||
union {
|
||||
node_status_t bits;
|
||||
uint32_t raw;
|
||||
} status_union;
|
||||
node_status_t status;
|
||||
long int last_state_change = -1;
|
||||
long int last_state_change;
|
||||
|
||||
while(recvline(fd, line, sizeof line)) {
|
||||
int n = sscanf(line, "%d %d %s %s %s port %s %d %d %d %d %x %"PRIx32" %s %s %d %hd %hd %hd %ld", &code, &req, node, id, host, port, &cipher, &digest, &maclength, &compression, &options, &status_union.raw, nexthop, via, &distance, &pmtu, &minmtu, &maxmtu, &last_state_change);
|
||||
|
|
|
@ -310,7 +310,7 @@ int cmd_invite(int argc, char *argv[]) {
|
|||
fprintf(stderr, "Error while reading directory %s: %s\n", filename, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
ecdsa_t *key;
|
||||
snprintf(filename, sizeof filename, "%s" SLASH "invitations" SLASH "ed25519_key.priv", confbase);
|
||||
|
||||
|
@ -573,7 +573,7 @@ make_names:
|
|||
snprintf(temp_netname, sizeof temp_netname, "join_%x", rand());
|
||||
netname = temp_netname;
|
||||
goto make_names;
|
||||
}
|
||||
}
|
||||
|
||||
if(mkdir(confbase, 0777) && errno != EEXIST) {
|
||||
fprintf(stderr, "Could not create directory %s: %s\n", confbase, strerror(errno));
|
||||
|
@ -605,7 +605,7 @@ make_names:
|
|||
// Filter first chunk on approved keywords, split between tinc.conf and hosts/Name
|
||||
// Other chunks go unfiltered to their respective host config files
|
||||
const char *p = data;
|
||||
char *l = NULL, *value = NULL;
|
||||
char *l, *value;
|
||||
|
||||
while((l = get_line(&p))) {
|
||||
// Ignore comments
|
||||
|
@ -971,7 +971,7 @@ next:
|
|||
return 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
ecdsa_t *hiskey = ecdsa_set_base64_public_key(fingerprint);
|
||||
if(!hiskey)
|
||||
return 1;
|
||||
|
@ -1001,7 +1001,7 @@ next:
|
|||
p += done;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sptps_stop(&sptps);
|
||||
ecdsa_free(hiskey);
|
||||
ecdsa_free(key);
|
||||
|
|
|
@ -713,7 +713,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
|
|||
/* Send the packet */
|
||||
|
||||
const sockaddr_t *sa = NULL;
|
||||
int sock = -1;
|
||||
int sock;
|
||||
|
||||
if(n->status.send_locally)
|
||||
choose_local_address(n, &sa, &sock);
|
||||
|
@ -795,7 +795,7 @@ bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_
|
|||
memcpy(buf_ptr, data, len); buf_ptr += len;
|
||||
|
||||
const sockaddr_t *sa = NULL;
|
||||
int sock = -1;
|
||||
int sock;
|
||||
if(relay->status.send_locally)
|
||||
choose_local_address(relay, &sa, &sock);
|
||||
if(!sa)
|
||||
|
|
|
@ -311,7 +311,7 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) {
|
|||
return false;
|
||||
}
|
||||
|
||||
int result = 0;
|
||||
int result;
|
||||
int prefixlength = -1;
|
||||
switch (subnet->type) {
|
||||
case SUBNET_MAC:
|
||||
|
|
Loading…
Reference in a new issue