Fix modernize-use-nullptr errors in csync tests
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 1 Sep 2020 15:52:49 +0000 (17:52 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Wed, 2 Sep 2020 06:12:46 +0000 (06:12 +0000)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
test/csync/csync_tests/check_csync_exclude.cpp
test/csync/vio_tests/check_vio_ext.cpp

index 18ca46d2cd52b9abc7f6e75ee9ce640ed2bfe08d..b090a2613383507a9245fcc1354a4169a641416c 100644 (file)
@@ -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;
index a45fff61d3b56d13dd87ecdffa9c0e0d6832f989..793b363d04ff69daf7bb93d7ab399a8d11ffc15a 100644 (file)
@@ -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);