diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-03-29 20:50:31 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-03-29 20:50:31 +0000 |
commit | ad12c46af58c9a03d02c73afbfaac308e6fcc0db (patch) | |
tree | ff15a96dbb82a0c82360a454c0123075bb541288 /windows/findfile.c | |
parent | 402aaeb368844d49a92d4215ecab9ae926767bc9 (diff) | |
download | netsurf-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
Diffstat (limited to 'windows/findfile.c')
-rw-r--r-- | windows/findfile.c | 17 |
1 files changed, 9 insertions, 8 deletions
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: */ |