From be5942aee7a012ce7f30bc7a6617903127f29e89 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 17 May 2024 07:30:19 +0200 Subject: 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 Discussion: https://www.postgresql.org/message-id/1919000.1715815925@sss.pgh.pa.us --- src/backend/commands/async.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/async.c') diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index d0891e3f0e0..ab4c72762d8 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -396,10 +396,10 @@ typedef struct NotificationList #define MIN_HASHABLE_NOTIFIES 16 /* threshold to build hashtab */ -typedef struct NotificationHash +struct NotificationHash { Notification *event; /* => the actual Notification struct */ -} NotificationHash; +}; static NotificationList *pendingNotifies = NULL; @@ -2299,7 +2299,7 @@ AddEventToPendingNotifies(Notification *n) /* Create the hash table */ hash_ctl.keysize = sizeof(Notification *); - hash_ctl.entrysize = sizeof(NotificationHash); + hash_ctl.entrysize = sizeof(struct NotificationHash); hash_ctl.hash = notification_hash; hash_ctl.match = notification_match; hash_ctl.hcxt = CurTransactionContext; -- cgit v1.2.3