You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Add strLstNewFmt().
Simplifies adding a formatted string to a list and removes a common cause of leaks.
This commit is contained in:
@ -114,11 +114,9 @@ cmdOption(void)
|
||||
|
||||
for (unsigned int keyIdx = 0; keyIdx < varLstSize(keyList); keyIdx++)
|
||||
{
|
||||
strLstAdd(
|
||||
valueList,
|
||||
strNewFmt(
|
||||
"%s=%s", strZ(varStr(varLstGet(keyList, keyIdx))),
|
||||
strZ(varStrForce(kvGet(optionKv, varLstGet(keyList, keyIdx))))));
|
||||
strLstAddFmt(
|
||||
valueList, "%s=%s", strZ(varStr(varLstGet(keyList, keyIdx))),
|
||||
strZ(varStrForce(kvGet(optionKv, varLstGet(keyList, keyIdx)))));
|
||||
}
|
||||
}
|
||||
// Generate values for list options
|
||||
|
Reference in New Issue
Block a user