Skip to content

Commit 2c698f4

Browse files
committed
Suppress "variable may be used uninitialized" warning.
Also re-pgindent, just because I'm a neatnik.
1 parent d824e28 commit 2c698f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/commands/policy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ policy_role_list_to_array(List *roles, int *num_roles)
144144
/* Handle no roles being passed in as being for public */
145145
if (roles == NIL)
146146
{
147-
*num_roles = 1;
147+
*num_roles = 1;
148148
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
149149
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
150150

151151
return role_oids;
152152
}
153153

154-
*num_roles = list_length(roles);
154+
*num_roles = list_length(roles);
155155
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
156156

157157
foreach(cell, roles)
@@ -169,7 +169,7 @@ policy_role_list_to_array(List *roles, int *num_roles)
169169
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
170170
errmsg("ignoring roles specified other than public"),
171171
errhint("All roles are members of the public role.")));
172-
*num_roles = 1;
172+
*num_roles = 1;
173173
}
174174
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
175175

@@ -656,7 +656,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
656656
Oid policy_id;
657657
Relation target_table;
658658
Oid table_id;
659-
Datum *role_oids;
659+
Datum *role_oids = NULL;
660660
int nitems = 0;
661661
ArrayType *role_ids = NULL;
662662
List *qual_parse_rtable = NIL;

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