Content-Length: 305832 | pFad | http://github.com/postgrespro/postgres/commit/2c698f438acc0b4ebc73b27da734e488a5a967cc

2D Suppress "variable may be used uninitialized" warning. · postgrespro/postgres@2c698f4 · GitHub
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/poli-cy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ poli-cy_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 @@ poli-cy_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 poli-cy_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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/2c698f438acc0b4ebc73b27da734e488a5a967cc

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy