From ad12c46af58c9a03d02c73afbfaac308e6fcc0db Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 29 Mar 2011 20:50:31 +0000 Subject: remove extraneous logging fix windows path_to_url coping with NULL input and allocation errors. remove forced verbose logging svn path=/trunk/netsurf/; revision=12147 --- windows/findfile.c | 17 +++++++++-------- windows/gui.c | 2 -- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'windows') diff --git a/windows/findfile.c b/windows/findfile.c index b7b5bea6d..8a3cb44a6 100644 --- a/windows/findfile.c +++ b/windows/findfile.c @@ -66,13 +66,6 @@ nsws_init_resource(const char *resource_path) pathi++; pathv[pathi] = winpath; - - pathi = 0; - while (pathv[pathi] != NULL) { - LOG(("pathv[%d] = \"%s\"",pathi, pathv[pathi])); - pathi++; - } - respath = filepath_generate(pathv, &lang); filepath_free_strvec(pathv); @@ -88,9 +81,17 @@ static char *realpath(const char *path, char *resolved_path) char *path_to_url(const char *path) { - char *url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 3); + char *url; char *sidx; + if (path == NULL) + return NULL; + + url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 3); + + if (url == NULL) + return NULL; + strcpy(url, FILE_SCHEME_PREFIX); if (*path == '/') { /* unix style path start, so try wine Z: */ diff --git a/windows/gui.c b/windows/gui.c index 58c749808..e8f1adff8 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -2603,8 +2603,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) LPWSTR *argvw; char *messages; - verbose_log = true; - if (SLEN(lpcli) > 0) { argvw = CommandLineToArgvW(GetCommandLineW(), &argc); } -- cgit v1.2.3