summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-01-17 00:37:31 +0100
committerNoel Grandin <noelgrandin@gmail.com>2015-01-19 06:18:37 +0000
commit5901827bd44dc3600bf66c83882e6847439d59d6 (patch)
tree3e4477e7a25cb10d836f6dcba1c49fcbb9e637d4 /ucb/source/ucp
parenta1fb4ac1991a8da2e527b64a0a01a88a8f2959e3 (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I1cd8b118e2598b8b18fb445851a3bb41e554267b Reviewed-on: https://gerrit.libreoffice.org/13967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/ftp/test_ftpurl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx
index bbc99cae9849..b93d2b09afca 100644
--- a/ucb/source/ucp/ftp/test_ftpurl.cxx
+++ b/ucb/source/ucp/ftp/test_ftpurl.cxx
@@ -245,7 +245,7 @@ int test_ftpopen(void)
FILE* file = url.open();
if(file) {
- int nbuf,ndest;
+ int nbuf;
const int bffsz = 256;
char buff[bffsz];
char *dest = (char*) malloc(sizeof(char));
@@ -254,7 +254,7 @@ int test_ftpopen(void)
memset((void*)buff, 0, bffsz);
fread(buff,bffsz-1,1,file);
nbuf = strlen(buff);
- ndest = strlen(dest);
+ int ndest = strlen(dest);
dest = (char*)realloc(dest,ndest + nbuf + 1);
strncat(dest,buff,nbuf);
} while(nbuf == bffsz-1);