You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-13 01:00:23 +02:00
Designated initializer cleanup.
Cleanup designated initializers created in b134175f
by moving struct members in or out for clarity.
This commit is contained in:
committed by
David Steele
parent
24d2494c82
commit
324f7cebe0
@ -783,15 +783,15 @@ restoreCleanBuild(Manifest *manifest)
|
||||
{
|
||||
.manifest = manifest,
|
||||
.target = manifestTarget(manifest, targetIdx),
|
||||
.delta = delta,
|
||||
.fileIgnore = strLstNew(),
|
||||
};
|
||||
|
||||
cleanData->targetName = cleanData->target->name;
|
||||
cleanData->targetPath = manifestTargetPath(manifest, cleanData->target);
|
||||
cleanData->basePath = strEq(cleanData->targetName, MANIFEST_TARGET_PGDATA_STR);
|
||||
cleanData->delta = delta;
|
||||
|
||||
// Ignore backup.manifest while cleaning since it may exist from an prior incomplete restore
|
||||
cleanData->fileIgnore = strLstNew();
|
||||
strLstAdd(cleanData->fileIgnore, BACKUP_MANIFEST_FILE_STR);
|
||||
|
||||
// Also ignore recovery files when recovery type = preserve
|
||||
|
@ -76,10 +76,11 @@ dbNew(PgClient *client, ProtocolClient *remoteClient, const String *applicationN
|
||||
*this = (Db)
|
||||
{
|
||||
.memContext = memContextCurrent(),
|
||||
.client = pgClientMove(client, memContextCurrent()),
|
||||
.remoteClient = remoteClient,
|
||||
.applicationName = strDup(applicationName),
|
||||
};
|
||||
|
||||
this->client = pgClientMove(client, this->memContext);
|
||||
}
|
||||
MEM_CONTEXT_NEW_END();
|
||||
|
||||
|
@ -52,8 +52,9 @@ protocolParallelJobNew(const Variant *key, ProtocolCommand *command)
|
||||
.memContext = memContextCurrent(),
|
||||
.state = protocolParallelJobStatePending,
|
||||
.key = varDup(key),
|
||||
.command = protocolCommandMove(command, memContextCurrent()),
|
||||
};
|
||||
|
||||
this->command = protocolCommandMove(command, this->memContext);
|
||||
}
|
||||
MEM_CONTEXT_NEW_END();
|
||||
|
||||
|
Reference in New Issue
Block a user