Fix modernize-use-nullptr errors in csync tests
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
9a0713fab7
commit
c7c37f9bef
|
@ -642,7 +642,7 @@ static void check_csync_excluded_performance(void **)
|
|||
// Being able to use QElapsedTimer for measurement would be nice...
|
||||
{
|
||||
struct timeval before, after;
|
||||
gettimeofday(&before, 0);
|
||||
gettimeofday(&before, nullptr);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
totalRc += check_dir_full("/this/is/quite/a/long/path/with/many/components");
|
||||
|
@ -650,7 +650,7 @@ static void check_csync_excluded_performance(void **)
|
|||
}
|
||||
assert_int_equal(totalRc, CSYNC_NOT_EXCLUDED); // mainly to avoid optimization
|
||||
|
||||
gettimeofday(&after, 0);
|
||||
gettimeofday(&after, nullptr);
|
||||
|
||||
const double total = (after.tv_sec - before.tv_sec)
|
||||
+ (after.tv_usec - before.tv_usec) / 1.0e6;
|
||||
|
@ -660,7 +660,7 @@ static void check_csync_excluded_performance(void **)
|
|||
|
||||
{
|
||||
struct timeval before, after;
|
||||
gettimeofday(&before, 0);
|
||||
gettimeofday(&before, nullptr);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
totalRc += check_dir_traversal("/this/is/quite/a/long/path/with/many/components");
|
||||
|
@ -668,7 +668,7 @@ static void check_csync_excluded_performance(void **)
|
|||
}
|
||||
assert_int_equal(totalRc, CSYNC_NOT_EXCLUDED); // mainly to avoid optimization
|
||||
|
||||
gettimeofday(&after, 0);
|
||||
gettimeofday(&after, nullptr);
|
||||
|
||||
const double total = (after.tv_sec - before.tv_sec)
|
||||
+ (after.tv_usec - before.tv_usec) / 1.0e6;
|
||||
|
|
|
@ -430,7 +430,7 @@ static void check_readdir_bigunicode(void **state)
|
|||
// 3: ? ASCII: 191 - BF
|
||||
// 4: ASCII: 32 - 20
|
||||
|
||||
char *p = 0;
|
||||
char *p = nullptr;
|
||||
asprintf( &p, "%s/%s", CSYNC_TEST_DIR, "goodone/" );
|
||||
int rc = _tmkdir(p, MKDIR_MASK);
|
||||
assert_int_equal(rc, 0);
|
||||
|
|
Loading…
Reference in New Issue