mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Remove unused typedefs
There were a few typedefs that were never used to define a variable or field. This had the effect that the buildfarm's typedefs.list would not include them, and so they would need to be re-added manually to keep the overall pgindent result perfectly clean. We can easily get rid of these typedefs to avoid the issue. In a few cases, we just let the enum or struct stand on its own without a typedef around it. In one case, an enum was abused to define flag bits; that's better done with macro definitions. This fixes all the remaining issues with missing entries in the buildfarm's typedefs.list. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/1919000.1715815925@sss.pgh.pa.us
This commit is contained in:
@@ -107,7 +107,7 @@ StaticAssertDecl(RESOWNER_HASH_MAX_ITEMS(RESOWNER_HASH_INIT_SIZE) >= RESOWNER_AR
|
||||
/*
|
||||
* ResourceOwner objects look like this
|
||||
*/
|
||||
typedef struct ResourceOwnerData
|
||||
struct ResourceOwnerData
|
||||
{
|
||||
ResourceOwner parent; /* NULL if no parent (toplevel owner) */
|
||||
ResourceOwner firstchild; /* head of linked list of children */
|
||||
@@ -155,7 +155,7 @@ typedef struct ResourceOwnerData
|
||||
|
||||
/* The local locks cache. */
|
||||
LOCALLOCK *locks[MAX_RESOWNER_LOCKS]; /* list of owned locks */
|
||||
} ResourceOwnerData;
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -415,7 +415,7 @@ ResourceOwnerCreate(ResourceOwner parent, const char *name)
|
||||
ResourceOwner owner;
|
||||
|
||||
owner = (ResourceOwner) MemoryContextAllocZero(TopMemoryContext,
|
||||
sizeof(ResourceOwnerData));
|
||||
sizeof(struct ResourceOwnerData));
|
||||
owner->name = name;
|
||||
|
||||
if (parent)
|
||||
|
||||
Reference in New Issue
Block a user