diff options
author | Stefan Fritsch <sf@apache.org> | 2010-07-27 22:09:45 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2010-07-27 22:09:45 +0000 |
commit | 443247b17081cb00b0e7f2f688889417cb45871f (patch) | |
tree | 1cb6ddc24a0845e85f254eec9056103e26b73d0b /file_io/win32 | |
parent | 473c87316e7cf23eadb438189d2932b86ac8afae (diff) | |
download | apr-443247b17081cb00b0e7f2f688889417cb45871f.tar.gz |
Fix various issues found by cppcheck
- error handling issues
- use of uninitialized data
- null pointer dereference
- unused variables
- memory/fd leaks
- broken code in threadproc/beos/proc.c
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r-- | file_io/win32/open.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/file_io/win32/open.c b/file_io/win32/open.c index a4e6f2692..c6afa5fe8 100644 --- a/file_io/win32/open.c +++ b/file_io/win32/open.c @@ -145,7 +145,6 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool) apr_wchar_t *wpre, *wfile, *ch; apr_size_t n = strlen(file) + 1; apr_size_t r, d; - apr_status_t rv; if (apr_os_level >= APR_WIN_2000) { if (global) @@ -169,7 +168,7 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool) wfile = apr_palloc(pool, (r + n) * sizeof(apr_wchar_t)); wcscpy(wfile, wpre); d = n; - if ((rv = apr_conv_utf8_to_ucs2(file, &n, wfile + r, &d))) { + if (apr_conv_utf8_to_ucs2(file, &n, wfile + r, &d)) { return NULL; } for (ch = wfile + r; *ch; ++ch) { @@ -186,7 +185,6 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool) apr_size_t n = strlen(file) + 1; #if !APR_HAS_UNICODE_FS - apr_status_t rv; apr_size_t r, d; char *pre; |