You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Add LENGTH_OF() macro.
Determining the length of arrays that could be calculated at compile time was a bit piecemeal, with special macros used sometimes and with the math done directly other times. This macro makes the task easier, uses less space, and automatically adjusts when the type changes.
This commit is contained in:
@ -23,7 +23,7 @@ testRun(void)
|
||||
|
||||
// Install local command handler shim
|
||||
static const ProtocolServerHandler testLocalHandlerList[] = {PROTOCOL_SERVER_HANDLER_VERIFY_LIST};
|
||||
hrnProtocolLocalShimInstall(testLocalHandlerList, PROTOCOL_SERVER_HANDLER_LIST_SIZE(testLocalHandlerList));
|
||||
hrnProtocolLocalShimInstall(testLocalHandlerList, LENGTH_OF(testLocalHandlerList));
|
||||
|
||||
StringList *argListBase = strLstNew();
|
||||
hrnCfgArgRawZ(argListBase, cfgOptStanza, "db");
|
||||
|
Reference in New Issue
Block a user