Skip to content

Commit 25114d3

Browse files
committed
wups, took out one memset too many ...
1 parent b05d3ae commit 25114d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
1515
*
16-
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.38 2003/07/22 19:00:10 tgl Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.39 2003/07/22 19:13:19 tgl Exp $
1717
* ----------
1818
*/
1919
#include "postgres.h"
@@ -799,7 +799,7 @@ pgstat_ping(void)
799799
void
800800
pgstat_initstats(PgStat_Info *stats, Relation rel)
801801
{
802-
PgStat_TableEntry *useent = NULL;
802+
PgStat_TableEntry *useent;
803803
Oid rel_id = rel->rd_id;
804804
int mb;
805805
int i;
@@ -875,6 +875,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
875875
*/
876876
i = pgStatTabstatMessages[mb]->m_nentries++;
877877
useent = &pgStatTabstatMessages[mb]->m_entry[i];
878+
MemSet(useent, 0, sizeof(PgStat_TableEntry));
878879
useent->t_id = rel_id;
879880
stats->tabentry = (void *) useent;
880881
return;
@@ -922,6 +923,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
922923
mb = pgStatTabstatUsed++;
923924
pgStatTabstatMessages[mb]->m_nentries = 1;
924925
useent = &pgStatTabstatMessages[mb]->m_entry[0];
926+
MemSet(useent, 0, sizeof(PgStat_TableEntry));
925927
useent->t_id = rel_id;
926928
stats->tabentry = (void *) useent;
927929
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy