You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Add cvtZSubNTo*() functions.
These functions allow conversion from substrings without needing to create a String or a temporary buffer. httpDateToTime() no longer requires a temp mem context. Also improve handling of month search to avoid an allocation. httpUriDecode() no longer requires a temp mem context. jsonReadStr() no longer requires a temp mem context. pgLsnFromWalSegment() no longer requires a temp mem context. pgVersionFromStr() no longer requires a temp mem context. Also do a bit of refactoring. storageGcsCvtTime() no longer leaks six Strings per call. storageS3CvtTime() no longer leaks six Strings per call.
This commit is contained in:
@ -65,7 +65,7 @@ testBackupValidateCallback(void *callbackData, const StorageInfo *info)
|
||||
|
||||
if (bundle)
|
||||
{
|
||||
const uint64_t bundleId = cvtZToUInt64(strZ(strSub(info->name, sizeof("bundle"))));
|
||||
const uint64_t bundleId = cvtZToUInt64(strZ(info->name) + sizeof("bundle"));
|
||||
|
||||
for (unsigned int fileIdx = 0; fileIdx < manifestFileTotal(data->manifest); fileIdx++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user