mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Use macro to define the number of enum values
Refactoring in the interest of code consistency, a follow-up to 2e068db56e.
The argument against inserting a special enum value at the end of the enum
definition is that a switch statement might generate a compiler warning unless
it has a default clause.
Aleksander Alekseev, reviewed by Michael Paquier, Dean Rasheed, Peter Eisentraut
Discussion: https://postgr.es/m/CAJ7c6TMsiaV5urU_Pq6zJ2tXPDwk69-NKVh4AMN5XrRiM7N%2BGA%40mail.gmail.com
This commit is contained in:
@@ -47,10 +47,10 @@ typedef enum
|
||||
PROCSIG_RECOVERY_CONFLICT_BUFFERPIN,
|
||||
PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK,
|
||||
PROCSIG_RECOVERY_CONFLICT_LAST = PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK,
|
||||
|
||||
NUM_PROCSIGNALS /* Must be last! */
|
||||
} ProcSignalReason;
|
||||
|
||||
#define NUM_PROCSIGNALS (PROCSIG_RECOVERY_CONFLICT_LAST + 1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PROCSIGNAL_BARRIER_SMGRRELEASE, /* ask smgr to close files */
|
||||
|
||||
Reference in New Issue
Block a user