Initialize variables in protocol_edge.c

This commit is contained in:
thorkill 2015-06-30 19:28:11 +02:00
parent fb1a8fd631
commit 932dc76f43

View file

@ -70,10 +70,13 @@ bool add_edge_h(connection_t *c, const char *request) {
char to_port[MAX_STRING_SIZE];
char address_local[MAX_STRING_SIZE];
char port_local[MAX_STRING_SIZE];
sockaddr_t address, local_address = {{0}};
sockaddr_t address, local_address;
uint32_t options;
int weight;
memset(&address, 0x0, sizeof(sockaddr_t));
memset(&local_address, 0x0, sizeof(sockaddr_t));
int parameter_count = sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %x %d "MAX_STRING" "MAX_STRING,
from_name, to_name, to_address, to_port, &options, &weight, address_local, port_local);
if (parameter_count != 6 && parameter_count != 8) {