You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Replace strCatFmt() with strCat()/strCatZ() where appropriate.
Most of these looked like copy/paste from a prior required strCatFmt() call. There is no issue here since strCatFmt() works the same in these cases, but using strCat()/strCatZ() is more efficient.
This commit is contained in:
@ -52,14 +52,14 @@ cmdOption(void)
|
||||
|
||||
if (!strLstEmpty(commandParamList))
|
||||
{
|
||||
strCatFmt(cmdOptionStr, " [");
|
||||
strCatZ(cmdOptionStr, " [");
|
||||
|
||||
for (unsigned int commandParamIdx = 0; commandParamIdx < strLstSize(commandParamList); commandParamIdx++)
|
||||
{
|
||||
const String *commandParam = strLstGet(commandParamList, commandParamIdx);
|
||||
|
||||
if (commandParamIdx != 0)
|
||||
strCatFmt(cmdOptionStr, ", ");
|
||||
strCatZ(cmdOptionStr, ", ");
|
||||
|
||||
if (strchr(strZ(commandParam), ' ') != NULL)
|
||||
commandParam = strNewFmt("\"%s\"", strZ(commandParam));
|
||||
@ -67,7 +67,7 @@ cmdOption(void)
|
||||
strCat(cmdOptionStr, commandParam);
|
||||
}
|
||||
|
||||
strCatFmt(cmdOptionStr, "]");
|
||||
strCatZ(cmdOptionStr, "]");
|
||||
}
|
||||
|
||||
// Loop though options and add the ones that are interesting
|
||||
|
Reference in New Issue
Block a user