From fe15c4cb58ec9294d7d4525f68fa9226020aeef8 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Thu, 22 Dec 2011 01:36:13 +0100 Subject: [PATCH] Fix VS2010 build issues. --- src/tools/uhub-passwd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/uhub-passwd.c b/src/tools/uhub-passwd.c index 79d3587..72ad9e0 100644 --- a/src/tools/uhub-passwd.c +++ b/src/tools/uhub-passwd.c @@ -66,12 +66,13 @@ static void print_usage(const char* str) static char* sql_escape_string(const char* str) { size_t i, n, size; + char* buf; for (n = 0, size = strlen(str); n < strlen(str); n++) if (str[n] == '\'') size++; - char* buf = malloc(size+1); + buf = malloc(size+1); for (n = 0, i = 0; n < strlen(str); n++) { if (str[n] == '\'') @@ -315,10 +316,10 @@ void main_usage(const char* binary) int main(int argc, char** argv) { + size_t n = 0; binary = argv[0]; filename = argv[1]; command = argv[2]; - size_t n = 0; if (argc < 3) {