summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/sorter/sortresult.cxx6
-rw-r--r--ucb/source/ucp/ftp/test_ftpurl.cxx4
2 files changed, 4 insertions, 6 deletions
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 7e1dde0ab407..d5fcabf5069e 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1278,12 +1278,11 @@ sal_IntPtr SortedResultSet::FindPos( SortListData *pEntry,
sal_IntPtr nEnd = _nEnd;
sal_IntPtr nMid = 0, nCompare = 0;
- SortListData *pMid;
while ( nStart <= nEnd )
{
nMid = ( nEnd - nStart ) / 2 + nStart;
- pMid = maS2O.GetData( nMid );
+ SortListData *pMid = maS2O.GetData( nMid );
nCompare = Compare( pEntry, pMid );
if ( !nCompare )
@@ -1771,12 +1770,11 @@ void SortedResultSet::ResortModified( EventList* pList )
void SortedResultSet::ResortNew( EventList* pList )
{
sal_IntPtr i, j, nNewPos, nVal;
- SortListData *pData;
try {
for ( i = mnLastSort; i<(sal_IntPtr)maS2O.Count(); i++ )
{
- pData = (SortListData*) maModList.GetObject( i );
+ SortListData *pData = (SortListData*) maModList.GetObject( i );
nNewPos = FindPos( pData, 1, mnLastSort );
if ( nNewPos != i )
{
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);