You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-18 23:57:33 +02:00
Add macros to create constant Buffer objects.
These are more efficient than creating buffers in place when needed. After replacement discovered that bufNewStr() and BufNewZ() were not being used in the core code so removed them. This required using the macros in tests which is not the usual pattern.
This commit is contained in:
@ -557,7 +557,7 @@ testRun(void)
|
||||
"{\"name\":\"pgBackRest\",\"service\":\"error\",\"version\":\"" PROJECT_VERSION "\"}\n"
|
||||
"{}\n");
|
||||
|
||||
IoRead *read = ioBufferReadIo(ioBufferReadNew(bufNewStr(protocolString)));
|
||||
IoRead *read = ioBufferReadIo(ioBufferReadNew(BUFSTR(protocolString)));
|
||||
ioReadOpen(read);
|
||||
IoWrite *write = ioBufferWriteIo(ioBufferWriteNew(bufNew(1024)));
|
||||
ioWriteOpen(write);
|
||||
@ -673,11 +673,10 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
storagePut(
|
||||
storageNewWriteNP(storageTest, strNew("pgbackrest.conf")),
|
||||
bufNewStr(
|
||||
strNew(
|
||||
"[global]\n"
|
||||
"repo1-cipher-type=aes-256-cbc\n"
|
||||
"repo1-cipher-pass=acbd\n")));
|
||||
BUFSTRDEF(
|
||||
"[global]\n"
|
||||
"repo1-cipher-type=aes-256-cbc\n"
|
||||
"repo1-cipher-pass=acbd\n"));
|
||||
|
||||
argList = strLstNew();
|
||||
strLstAddZ(argList, "/usr/bin/pgbackrest");
|
||||
@ -704,11 +703,10 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
storagePut(
|
||||
storageNewWriteNP(storageTest, strNew("pgbackrest.conf")),
|
||||
bufNewStr(
|
||||
strNew(
|
||||
"[global]\n"
|
||||
"repo1-cipher-type=aes-256-cbc\n"
|
||||
"repo1-cipher-pass=dcba\n")));
|
||||
BUFSTRDEF(
|
||||
"[global]\n"
|
||||
"repo1-cipher-type=aes-256-cbc\n"
|
||||
"repo1-cipher-pass=dcba\n"));
|
||||
|
||||
argList = strLstNew();
|
||||
strLstAddZ(argList, "/usr/bin/pgbackrest");
|
||||
|
Reference in New Issue
Block a user