summaryrefslogtreecommitdiff
path: root/src/backend/catalog/aclchk.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-12-04 19:40:08 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-12-04 19:40:08 +0100
commitc6be3daa054a2fac67331f3bfc348b9bfd6f690c (patch)
tree6192a7063cf5ef1c103c69f919a8f341955b7568 /src/backend/catalog/aclchk.c
parent6bd469d26aca6ea413b35bfcb611dfa3a8f5ea45 (diff)
Remove no longer needed casts to Pointer
These casts used to be required when Pointer was char *, but now it's void * (commit 1b2bb5077e9), so they are not needed anymore. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/4154950a-47ae-4223-bd01-1235cc50e933%40eisentraut.org
Diffstat (limited to 'src/backend/catalog/aclchk.c')
-rw-r--r--src/backend/catalog/aclchk.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index d183f2990ce..cb496e018c5 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -3125,7 +3125,7 @@ object_aclmask_ext(Oid classid, Oid objectid, Oid roleid,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -3255,7 +3255,7 @@ pg_attribute_aclmask_ext(Oid table_oid, AttrNumber attnum, Oid roleid,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(attTuple);
@@ -3362,7 +3362,7 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -3454,7 +3454,7 @@ pg_parameter_aclmask(const char *name, Oid roleid, AclMode mask, AclMaskHow how)
result = aclmask(acl, roleid, BOOTSTRAP_SUPERUSERID, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -3509,7 +3509,7 @@ pg_parameter_acl_aclmask(Oid acl_oid, Oid roleid, AclMode mask, AclMaskHow how)
result = aclmask(acl, roleid, BOOTSTRAP_SUPERUSERID, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -3589,7 +3589,7 @@ pg_largeobject_aclmask_snapshot(Oid lobj_oid, Oid roleid,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
systable_endscan(scan);
@@ -3683,7 +3683,7 @@ pg_namespace_aclmask_ext(Oid nsp_oid, Oid roleid,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -3819,7 +3819,7 @@ pg_type_aclmask_ext(Oid type_oid, Oid roleid, AclMode mask, AclMaskHow how,
result = aclmask(acl, roleid, ownerId, mask, how);
/* if we have a detoasted copy, free it */
- if (acl && (Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl && acl != DatumGetPointer(aclDatum))
pfree(acl);
ReleaseSysCache(tuple);
@@ -4003,7 +4003,7 @@ pg_attribute_aclcheck_all_ext(Oid table_oid, Oid roleid,
attmask = aclmask(acl, roleid, ownerId, mode, ACLMASK_ANY);
/* if we have a detoasted copy, free it */
- if ((Pointer) acl != DatumGetPointer(aclDatum))
+ if (acl != DatumGetPointer(aclDatum))
pfree(acl);
}