From c7c37f9beff8bb397c87b853904247a9b9724e9b Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Tue, 1 Sep 2020 17:52:49 +0200 Subject: [PATCH] Fix modernize-use-nullptr errors in csync tests Signed-off-by: Kevin Ottens --- test/csync/csync_tests/check_csync_exclude.cpp | 8 ++++---- test/csync/vio_tests/check_vio_ext.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/csync/csync_tests/check_csync_exclude.cpp b/test/csync/csync_tests/check_csync_exclude.cpp index 18ca46d2c..b090a2613 100644 --- a/test/csync/csync_tests/check_csync_exclude.cpp +++ b/test/csync/csync_tests/check_csync_exclude.cpp @@ -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; diff --git a/test/csync/vio_tests/check_vio_ext.cpp b/test/csync/vio_tests/check_vio_ext.cpp index a45fff61d..793b363d0 100644 --- a/test/csync/vio_tests/check_vio_ext.cpp +++ b/test/csync/vio_tests/check_vio_ext.cpp @@ -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); -- 2.30.2