mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Suppress "variable may be used uninitialized" warning.
Also re-pgindent, just because I'm a neatnik.
This commit is contained in:
parent
d824e2800f
commit
2c698f438a
@ -144,14 +144,14 @@ policy_role_list_to_array(List *roles, int *num_roles)
|
|||||||
/* Handle no roles being passed in as being for public */
|
/* Handle no roles being passed in as being for public */
|
||||||
if (roles == NIL)
|
if (roles == NIL)
|
||||||
{
|
{
|
||||||
*num_roles = 1;
|
*num_roles = 1;
|
||||||
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
|
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
|
||||||
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
|
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
|
||||||
|
|
||||||
return role_oids;
|
return role_oids;
|
||||||
}
|
}
|
||||||
|
|
||||||
*num_roles = list_length(roles);
|
*num_roles = list_length(roles);
|
||||||
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
|
role_oids = (Datum *) palloc(*num_roles * sizeof(Datum));
|
||||||
|
|
||||||
foreach(cell, roles)
|
foreach(cell, roles)
|
||||||
@ -169,7 +169,7 @@ policy_role_list_to_array(List *roles, int *num_roles)
|
|||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("ignoring roles specified other than public"),
|
errmsg("ignoring roles specified other than public"),
|
||||||
errhint("All roles are members of the public role.")));
|
errhint("All roles are members of the public role.")));
|
||||||
*num_roles = 1;
|
*num_roles = 1;
|
||||||
}
|
}
|
||||||
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
|
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
|
|||||||
Oid policy_id;
|
Oid policy_id;
|
||||||
Relation target_table;
|
Relation target_table;
|
||||||
Oid table_id;
|
Oid table_id;
|
||||||
Datum *role_oids;
|
Datum *role_oids = NULL;
|
||||||
int nitems = 0;
|
int nitems = 0;
|
||||||
ArrayType *role_ids = NULL;
|
ArrayType *role_ids = NULL;
|
||||||
List *qual_parse_rtable = NIL;
|
List *qual_parse_rtable = NIL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user