aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_target.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-16 08:42:15 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-16 08:50:49 +0200
commit9fd45870c1436b477264c0c82eb195df52bc0919 (patch)
tree10a09724c0bcffa8f58f262e50c3260cde484446 /src/backend/parser/parse_target.c
parentc94ae9d827a360d74da6a304692d34a4dc8b6445 (diff)
downloadpostgresql-9fd45870c1436b477264c0c82eb195df52bc0919.tar.gz
postgresql-9fd45870c1436b477264c0c82eb195df52bc0919.zip
Replace many MemSet calls with struct initialization
This replaces all MemSet() calls with struct initialization where that is easily and obviously possible. (For example, some cases have to worry about padding bits, so I left those.) (The same could be done with appropriate memset() calls, but this patch is part of an effort to phase out MemSet(), so it doesn't touch memset() calls.) Reviewed-by: Ranier Vilela <ranier.vf@gmail.com> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://www.postgresql.org/message-id/9847b13c-b785-f4e2-75c3-12ec77a3b05c@enterprisedb.com
Diffstat (limited to 'src/backend/parser/parse_target.c')
-rw-r--r--src/backend/parser/parse_target.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index 2a1d44b813b..16a0fe59e21 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -1594,9 +1594,8 @@ expandRecordVariable(ParseState *pstate, Var *var, int levelsup)
* to. We have to build an additional level of ParseState
* to keep in step with varlevelsup in the subselect.
*/
- ParseState mypstate;
+ ParseState mypstate = {0};
- MemSet(&mypstate, 0, sizeof(mypstate));
mypstate.parentParseState = pstate;
mypstate.p_rtable = rte->subquery->rtable;
/* don't bother filling the rest of the fake pstate */