Author: vince
Date: Tue Mar 29 15:50:31 2011
New Revision: 12147
URL:
http://source.netsurf-browser.org?rev=12147&view=rev
Log:
remove extraneous logging
fix windows path_to_url coping with NULL input and allocation errors.
remove forced verbose logging
Modified:
trunk/netsurf/utils/filepath.c
trunk/netsurf/windows/findfile.c
trunk/netsurf/windows/gui.c
Modified: trunk/netsurf/utils/filepath.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/utils/filepath.c?rev=1214...
==============================================================================
--- trunk/netsurf/utils/filepath.c (original)
+++ trunk/netsurf/utils/filepath.c Tue Mar 29 15:50:31 2011
@@ -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 @@
while (respathv[respathc] != NULL) {
if (filepath_sfindfile(filepath, "%s/%s", respathv[respathc], filename) !=
NULL) {
- LOG(("ret\"%s\"",filepath));
-
return filepath;
}
@@ -146,8 +143,6 @@
if (ret == NULL)
free(filepath);
-
- LOG(("ret\"%s\"",ret));
return ret;
}
Modified: trunk/netsurf/windows/findfile.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/windows/findfile.c?rev=12...
==============================================================================
--- trunk/netsurf/windows/findfile.c (original)
+++ trunk/netsurf/windows/findfile.c Tue Mar 29 15:50:31 2011
@@ -66,13 +66,6 @@
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,8 +81,16 @@
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 == '/') {
Modified: trunk/netsurf/windows/gui.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=12147&a...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Tue Mar 29 15:50:31 2011
@@ -2603,8 +2603,6 @@
LPWSTR *argvw;
char *messages;
- verbose_log = true;
-
if (SLEN(lpcli) > 0) {
argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
}