1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-17 01:12:23 +02:00

Add strCatZ().

strCat() did not follow our convention of appending Z to functions that accept zero-terminated strings rather than String objects.

Add strCatZ() to accept zero-terminated strings and update strCat() to accept String objects.

Use LF_STR where appropriate but don't use other String constants because they do not improve readability.
This commit is contained in:
David Steele
2020-06-24 12:09:24 -04:00
committed by GitHub
parent dab00e2010
commit 45d9b03136
29 changed files with 161 additions and 145 deletions

View File

@ -168,8 +168,8 @@ protocolClientProcessError(ProtocolClient *this, KeyValue *errorKv)
{
const String *stack = varStr(kvGet(errorKv, VARSTR(PROTOCOL_ERROR_STACK_STR)));
strCat(throwMessage, "\n");
strCat(throwMessage, stack == NULL ? "no stack trace available" : strPtr(stack));
strCat(throwMessage, LF_STR);
strCat(throwMessage, stack == NULL ? STRDEF("no stack trace available") : stack);
}
THROWP(type, strPtr(throwMessage));