Use NULL instead of 0 for pointer arguments.
authorNathan Bossart <[email protected]>
Fri, 6 Jun 2025 17:08:17 +0000 (12:08 -0500)
committerNathan Bossart <[email protected]>
Fri, 6 Jun 2025 17:08:17 +0000 (12:08 -0500)
Commit 5fe08c006c fixed this for calls to dshash_create().  This
commit fixes calls to dshash_attach() and dsa_create_in_place().

Reviewed-by: Masahiko Sawada <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://postgr.es/m/aECi_gSD9JnVWQ8T%40nathan

src/backend/replication/logical/launcher.c
src/backend/utils/activity/pgstat_shmem.c

index 10677da56b2b6843cb68f07db1490d0b2026021c..1c3c051403dd638d257483495657f432297f37f7 100644 (file)
@@ -1016,7 +1016,7 @@ logicalrep_launcher_attach_dshmem(void)
        last_start_times_dsa = dsa_attach(LogicalRepCtx->last_start_dsa);
        dsa_pin_mapping(last_start_times_dsa);
        last_start_times = dshash_attach(last_start_times_dsa, &dsh_params,
-                                        LogicalRepCtx->last_start_dsh, 0);
+                                        LogicalRepCtx->last_start_dsh, NULL);
    }
 
    MemoryContextSwitchTo(oldcontext);
index 2e33293b000977463bb391af0deb89efe1509230..53e7d534270ac65085f08f9fb11615102151b894 100644 (file)
@@ -183,7 +183,7 @@ StatsShmemInit(void)
        p += MAXALIGN(pgstat_dsa_init_size());
        dsa = dsa_create_in_place(ctl->raw_dsa_area,
                                  pgstat_dsa_init_size(),
-                                 LWTRANCHE_PGSTATS_DSA, 0);
+                                 LWTRANCHE_PGSTATS_DSA, NULL);
        dsa_pin(dsa);
 
        /*
@@ -255,7 +255,8 @@ pgstat_attach_shmem(void)
    dsa_pin_mapping(pgStatLocal.dsa);
 
    pgStatLocal.shared_hash = dshash_attach(pgStatLocal.dsa, &dsh_params,
-                                           pgStatLocal.shmem->hash_handle, 0);
+                                           pgStatLocal.shmem->hash_handle,
+                                           NULL);
 
    MemoryContextSwitchTo(oldcontext);
 }