diff options
Diffstat (limited to 'contrib/pageinspect/hashfuncs.c')
| -rw-r--r-- | contrib/pageinspect/hashfuncs.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c index 5287dbe1a30..81815392d70 100644 --- a/contrib/pageinspect/hashfuncs.c +++ b/contrib/pageinspect/hashfuncs.c @@ -238,7 +238,7 @@ hash_page_stats(PG_FUNCTION_ARGS) Page page; int j; Datum values[9]; - bool nulls[9]; + bool nulls[9] = {0}; HashPageStat stat; HeapTuple tuple; TupleDesc tupleDesc; @@ -261,8 +261,6 @@ hash_page_stats(PG_FUNCTION_ARGS) elog(ERROR, "return type must be a row type"); tupleDesc = BlessTupleDesc(tupleDesc); - MemSet(nulls, 0, sizeof(nulls)); - j = 0; values[j++] = Int32GetDatum(stat.live_items); values[j++] = Int32GetDatum(stat.dead_items); @@ -303,7 +301,7 @@ hash_page_items(PG_FUNCTION_ARGS) Page page; Datum result; Datum values[3]; - bool nulls[3]; + bool nulls[3] = {0}; uint32 hashkey; HeapTuple tuple; FuncCallContext *fctx; @@ -361,8 +359,6 @@ hash_page_items(PG_FUNCTION_ARGS) itup = (IndexTuple) PageGetItem(uargs->page, id); - MemSet(nulls, 0, sizeof(nulls)); - j = 0; values[j++] = Int32GetDatum((int32) uargs->offset); values[j++] = PointerGetDatum(&itup->t_tid); @@ -409,7 +405,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS) int i, j; Datum values[3]; - bool nulls[3]; + bool nulls[3] = {0}; uint32 *freep; if (!superuser()) @@ -495,8 +491,6 @@ hash_bitmap_info(PG_FUNCTION_ARGS) elog(ERROR, "return type must be a row type"); tupleDesc = BlessTupleDesc(tupleDesc); - MemSet(nulls, 0, sizeof(nulls)); - j = 0; values[j++] = Int64GetDatum((int64) bitmapblkno); values[j++] = Int32GetDatum(bitmapbit); @@ -526,7 +520,7 @@ hash_metapage_info(PG_FUNCTION_ARGS) int i, j; Datum values[16]; - bool nulls[16]; + bool nulls[16] = {0}; Datum spares[HASH_MAX_SPLITPOINTS]; Datum mapp[HASH_MAX_BITMAPS]; @@ -544,8 +538,6 @@ hash_metapage_info(PG_FUNCTION_ARGS) metad = HashPageGetMeta(page); - MemSet(nulls, 0, sizeof(nulls)); - j = 0; values[j++] = Int64GetDatum((int64) metad->hashm_magic); values[j++] = Int64GetDatum((int64) metad->hashm_version); |
