From 1a87a33911c26b69a1143709410a7837d84e24cd Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 18 Nov 2006 00:14:43 +0000 Subject: (svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c) --- win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32.c') diff --git a/win32.c b/win32.c index b8e34c4d5..4a14b65c9 100644 --- a/win32.c +++ b/win32.c @@ -637,7 +637,6 @@ static inline void dir_free(DIR *d) DIR *opendir(const char *path) { - char search_path[MAX_PATH]; DIR *d; UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box DWORD fa = GetFileAttributes(path); @@ -645,6 +644,7 @@ DIR *opendir(const char *path) if ((fa != INVALID_FILE_ATTRIBUTES) && (fa & FILE_ATTRIBUTE_DIRECTORY)) { d = dir_calloc(); if (d != NULL) { + char search_path[MAX_PATH]; /* build search path for FindFirstFile */ snprintf(search_path, lengthof(search_path), "%s" PATHSEP "*", path); d->hFind = FindFirstFile(search_path, &d->fd); @@ -893,7 +893,7 @@ void DeterminePaths(void) GetCurrentDirectory(MAX_PATH - 1, cfg); cfg[0] = toupper(cfg[0]); - s = strchr(cfg, 0); + s = strchr(cfg, '\0'); if (s[-1] != '\\') strcpy(s, "\\"); _path.save_dir = str_fmt("%ssave", cfg); -- cgit v1.2.3-54-g00ecf