1
0
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:
David Steele
2022-04-07 11:44:45 -04:00
parent cff147a7d2
commit 8be11d32e4
8 changed files with 30 additions and 30 deletions

View File

@ -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