From ef8e3b7ea4df6f27bf7b26ffde7bd41eebb94c26 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sat, 15 Aug 2009 19:35:07 +0000 Subject: [PATCH] Fix win32 build error --- src/iodine.c | 2 ++ src/iodined.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/iodine.c b/src/iodine.c index 4dcbe14..9892439 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -1216,7 +1216,9 @@ main(int argc, char **argv) memset(password, 0, 33); nameserv_addr = NULL; +#ifndef WINDOWS32 pw = NULL; +#endif username = NULL; foreground = 0; newroot = NULL; diff --git a/src/iodined.c b/src/iodined.c index 1d10f68..5028c84 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -330,7 +330,6 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len) char unpacked[64*1024]; char *tmp[2]; int userid; - int code; int read; userid = -1; @@ -554,6 +553,8 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len) } else if((in[0] >= '0' && in[0] <= '9') || (in[0] >= 'a' && in[0] <= 'f') || (in[0] >= 'A' && in[0] <= 'F')) { + int code = -1; + if ((in[0] >= '0' && in[0] <= '9')) code = in[0] - '0'; if ((in[0] >= 'a' && in[0] <= 'f')) @@ -1142,7 +1143,9 @@ main(int argc, char **argv) char *netsize; int retval; +#ifndef WINDOWS32 pw = NULL; +#endif username = NULL; newroot = NULL; context = NULL;