Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c5b0582

Browse filesBrowse files
committed
Replace more MemSet calls with struct initialization
This fixes up 10ea0f9 to use the style introduced by 9fd4587. Author: Richard Guo <guofenglinux@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAMbWs490gJf5A=ydqyjh+Z8mVQa_foTGtcmBtHGLra0aOwLWHQ@mail.gmail.com
1 parent bf09437 commit c5b0582
Copy full SHA for c5b0582

File tree

Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed

‎src/backend/utils/adt/pgstatfuncs.c

Copy file name to clipboardExpand all lines: src/backend/utils/adt/pgstatfuncs.c
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,15 +709,11 @@ pg_stat_get_backend_subxact(PG_FUNCTION_ARGS)
709709
{
710710
#define PG_STAT_GET_SUBXACT_COLS 2
711711
TupleDesc tupdesc;
712-
Datum values[PG_STAT_GET_SUBXACT_COLS];
713-
bool nulls[PG_STAT_GET_SUBXACT_COLS];
712+
Datum values[PG_STAT_GET_SUBXACT_COLS] = {0};
713+
bool nulls[PG_STAT_GET_SUBXACT_COLS] = {0};
714714
int32 beid = PG_GETARG_INT32(0);
715715
LocalPgBackendStatus *local_beentry;
716716

717-
/* Initialise values and NULL flags arrays */
718-
MemSet(values, 0, sizeof(values));
719-
MemSet(nulls, 0, sizeof(nulls));
720-
721717
/* Initialise attributes information in the tuple descriptor */
722718
tupdesc = CreateTemplateTupleDesc(PG_STAT_GET_SUBXACT_COLS);
723719
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "subxact_count",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.