From: Kevin Ottens Date: Tue, 1 Sep 2020 15:52:49 +0000 (+0200) Subject: Fix modernize-use-nullptr errors in csync tests X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~193^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c7c37f9beff8bb397c87b853904247a9b9724e9b;p=nextcloud-desktop.git Fix modernize-use-nullptr errors in csync tests Signed-off-by: Kevin Ottens --- 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);