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

Commit572e3e6

Browse files
committed
Initialize structure at declaration
Avoids extra memset call and cast.Discussion:https://www.postgresql.org/message-id/flat/7a5cbea7-b8df-e910-0f10-04014bcad701%402ndquadrant.com
1 parent9a8ee1d commit572e3e6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎contrib/dblink/dblink.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -982,13 +982,11 @@ materializeQueryResult(FunctionCallInfo fcinfo,
982982
{
983983
ReturnSetInfo*rsinfo= (ReturnSetInfo*)fcinfo->resultinfo;
984984
PGresult*volatileres=NULL;
985-
volatilestoreInfosinfo;
985+
volatilestoreInfosinfo= {0};
986986

987987
/* prepTuplestoreResult must have been called previously */
988988
Assert(rsinfo->returnMode==SFRM_Materialize);
989989

990-
/* initialize storeInfo to empty */
991-
memset((void*)&sinfo,0,sizeof(sinfo));
992990
sinfo.fcinfo=fcinfo;
993991

994992
PG_TRY();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp