diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-03-12 20:57:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-12 22:28:38 +0000 |
commit | c3cd1005568469dc2514627c76378c2f84da2b0d (patch) | |
tree | 5457b8cda8b2afeea297e551ce45b3bb80985e98 /cppuhelper | |
parent | 6d15c85759d25807cf88561ac3d05cae5f15a169 (diff) |
CppCheck cleanlyness : reduce variable's scope
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f
Reviewed-on: https://gerrit.libreoffice.org/14843
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/findsofficepath.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c index 37c8bdfc5e07..b199e4e84aa2 100644 --- a/cppuhelper/source/findsofficepath.c +++ b/cppuhelper/source/findsofficepath.c @@ -124,8 +124,6 @@ static char* platformSpecific(void) char* env = NULL; char* str = NULL; char* dir = NULL; - char* file = NULL; - char* resolved = NULL; char* sep = NULL; char buffer[PATH_MAX]; @@ -146,7 +144,8 @@ static char* platformSpecific(void) while ( dir ) { /* construct soffice file path */ - file = (char*) malloc( strlen( dir ) + strlen( APPENDIX ) + 1 ); + char* resolved = NULL; + char* file = (char*) malloc( strlen( dir ) + strlen( APPENDIX ) + 1 ); if (file == NULL) { free(str); |