Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc5b0582

Browse files
committed
Replace more MemSet calls with struct initialization
This fixes up10ea0f9 to use the style introduced by9fd4587.Author: Richard Guo <guofenglinux@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CAMbWs490gJf5A=ydqyjh+Z8mVQa_foTGtcmBtHGLra0aOwLWHQ@mail.gmail.com
1 parentbf09437 commitc5b0582

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines 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
#definePG_STAT_GET_SUBXACT_COLS2
711711
TupleDesctupdesc;
712-
Datumvalues[PG_STAT_GET_SUBXACT_COLS];
713-
boolnulls[PG_STAT_GET_SUBXACT_COLS];
712+
Datumvalues[PG_STAT_GET_SUBXACT_COLS]= {0};
713+
boolnulls[PG_STAT_GET_SUBXACT_COLS]= {0};
714714
int32beid=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)

[8]ページ先頭

©2009-2025 Movatter.jp