Fix some uninitialized variable warnings

This commit is contained in:
Erik Ekman 2009-08-15 19:28:48 +00:00 committed by Erik Ekman
parent 24871faa99
commit cb926cf0c9
2 changed files with 5 additions and 1 deletions

View File

@ -1215,6 +1215,8 @@ main(int argc, char **argv)
int raw_mode; int raw_mode;
memset(password, 0, 33); memset(password, 0, 33);
nameserv_addr = NULL;
pw = NULL;
username = NULL; username = NULL;
foreground = 0; foreground = 0;
newroot = NULL; newroot = NULL;

View File

@ -330,7 +330,6 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len)
char unpacked[64*1024]; char unpacked[64*1024];
char *tmp[2]; char *tmp[2];
int userid; int userid;
int version;
int code; int code;
int read; int read;
@ -339,6 +338,8 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len)
memcpy(in, q->name, MIN(domain_len, sizeof(in))); memcpy(in, q->name, MIN(domain_len, sizeof(in)));
if(in[0] == 'V' || in[0] == 'v') { if(in[0] == 'V' || in[0] == 'v') {
int version = 0;
read = unpack_data(unpacked, sizeof(unpacked), &(in[1]), domain_len - 1, b32); read = unpack_data(unpacked, sizeof(unpacked), &(in[1]), domain_len - 1, b32);
/* Version greeting, compare and send ack/nak */ /* Version greeting, compare and send ack/nak */
if (read > 4) { if (read > 4) {
@ -1141,6 +1142,7 @@ main(int argc, char **argv)
char *netsize; char *netsize;
int retval; int retval;
pw = NULL;
username = NULL; username = NULL;
newroot = NULL; newroot = NULL;
context = NULL; context = NULL;