summaryrefslogtreecommitdiff
path: root/src/test/modules/test_predtest/test_predtest.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-16 08:42:15 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-16 08:50:49 +0200
commit9fd45870c1436b477264c0c82eb195df52bc0919 (patch)
tree10a09724c0bcffa8f58f262e50c3260cde484446 /src/test/modules/test_predtest/test_predtest.c
parentc94ae9d827a360d74da6a304692d34a4dc8b6445 (diff)
Replace many MemSet calls with struct initialization
This replaces all MemSet() calls with struct initialization where that is easily and obviously possible. (For example, some cases have to worry about padding bits, so I left those.) (The same could be done with appropriate memset() calls, but this patch is part of an effort to phase out MemSet(), so it doesn't touch memset() calls.) Reviewed-by: Ranier Vilela <ranier.vf@gmail.com> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://www.postgresql.org/message-id/9847b13c-b785-f4e2-75c3-12ec77a3b05c@enterprisedb.com
Diffstat (limited to 'src/test/modules/test_predtest/test_predtest.c')
-rw-r--r--src/test/modules/test_predtest/test_predtest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/modules/test_predtest/test_predtest.c b/src/test/modules/test_predtest/test_predtest.c
index 3b19e0eadc0..2ce88cb6245 100644
--- a/src/test/modules/test_predtest/test_predtest.c
+++ b/src/test/modules/test_predtest/test_predtest.c
@@ -50,7 +50,7 @@ test_predtest(PG_FUNCTION_ARGS)
strong_refuted_by,
weak_refuted_by;
Datum values[8];
- bool nulls[8];
+ bool nulls[8] = {0};
int i;
/* We use SPI to parse, plan, and execute the test query */
@@ -204,7 +204,6 @@ test_predtest(PG_FUNCTION_ARGS)
"w_r_holds", BOOLOID, -1, 0);
tupdesc = BlessTupleDesc(tupdesc);
- MemSet(nulls, 0, sizeof(nulls));
values[0] = BoolGetDatum(strong_implied_by);
values[1] = BoolGetDatum(weak_implied_by);
values[2] = BoolGetDatum(strong_refuted_by);