diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-13 15:08:01 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-02-13 15:08:20 +0100 |
commit | 814ae45d4b968c95a49fb35c47f4c813fa2dc026 (patch) | |
tree | 53a61f5a4093b8d28a81b3e5a16aa2c9f9089c1f /ucb | |
parent | sdremote: avoid crash when fiddling with elapsed time. (diff) | |
download | core-814ae45d4b968c95a49fb35c47f4c813fa2dc026.tar.gz core-814ae45d4b968c95a49fb35c47f4c813fa2dc026.zip |
Some cppcheck cleaning
Change-Id: I099171d85a51095f0ff6d592c1260d931f9769b2
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/ftp/test_ftpurl.cxx | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index bb9fa020e865..d37ce9069386 100644 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx @@ -25,12 +25,6 @@ #include "debughelper.hxx" #include <vector> -#define TESTEVAL \ - if(number_of_errors) \ - fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); \ - return number_of_errors - - struct ServerInfo { rtl::OUString host; rtl::OUString port; @@ -138,7 +132,11 @@ int test_ftpurl(void) { ascii = "ftp://host/bla/../../test/", n = "anonymous", p = ""; TESTURL; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } @@ -161,7 +159,11 @@ int test_ftplist(void) { if(!(vec[0].m_aName == "dir1" && vec[1].m_aName == "dir2" && vec[2].m_aName == "file1" )) ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } @@ -202,13 +204,16 @@ int test_ftpparent(void) { expect = "ftp://abi:psswd@abi-1/.."; TESTPARENT; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } int test_ftpproperties(void) { int number_of_errors = 0; - const char* name = "test_ftpproperties"; FTPHandleProviderI provider; ftp::FTPURL url( @@ -220,14 +225,18 @@ int test_ftpproperties(void) { if(!(ade.m_aName == "file" && ade.isFile())) ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + const char* name = "test_ftpproperties"; + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } int test_ftpopen(void) { int number_of_errors = 0; - const char* name = "test_ftpopen"; FTPHandleProviderI provider; ftp::FTPURL url( @@ -258,7 +267,12 @@ int test_ftpopen(void) } else ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + const char* name = "test_ftpopen"; + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } |