summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-03-29 20:50:31 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-03-29 20:50:31 +0000
commitad12c46af58c9a03d02c73afbfaac308e6fcc0db (patch)
treeff15a96dbb82a0c82360a454c0123075bb541288
parent402aaeb368844d49a92d4215ecab9ae926767bc9 (diff)
downloadnetsurf-ad12c46af58c9a03d02c73afbfaac308e6fcc0db.tar.gz
netsurf-ad12c46af58c9a03d02c73afbfaac308e6fcc0db.tar.bz2
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
-rw-r--r--utils/filepath.c5
-rw-r--r--windows/findfile.c17
-rw-r--r--windows/gui.c2
3 files changed, 9 insertions, 15 deletions
diff --git a/utils/filepath.c b/utils/filepath.c
index 7b85e4c9e..21a965949 100644
--- a/utils/filepath.c
+++ b/utils/filepath.c
@@ -33,7 +33,6 @@
#include "utils/config.h"
#include "utils/filepath.h"
-#include "utils/log.h"
/** maximum number of elements in the resource vector */
#define MAX_RESPATH 128
@@ -118,8 +117,6 @@ char *filepath_sfind(char **respathv, char *filepath, const char *filename)
while (respathv[respathc] != NULL) {
if (filepath_sfindfile(filepath, "%s/%s", respathv[respathc], filename) != NULL) {
- LOG(("ret\"%s\"",filepath));
-
return filepath;
}
@@ -147,8 +144,6 @@ char *filepath_find(char **respathv, const char *filename)
if (ret == NULL)
free(filepath);
- LOG(("ret\"%s\"",ret));
-
return ret;
}
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);
}