You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Remove context wrapper when processing defaults during config parsing.
Once upon a time storing the default required creating a new string that needed to be assigned to the config mem context but that was a very long time ago and now only constants are used, so no need for a context switch.
This commit is contained in:
		| @@ -2643,16 +2643,8 @@ cfgParse(const Storage *const storage, const unsigned int argListSize, const cha | ||||
|                     // Else try to set a default | ||||
|                     else | ||||
|                     { | ||||
|                         bool found = false; | ||||
|  | ||||
|                         MEM_CONTEXT_BEGIN(config->memContext) | ||||
|                         { | ||||
|                             found = cfgParseOptionalRule(&optionalRules, parseRuleOptionalTypeDefault, config->command, optionId); | ||||
|                         } | ||||
|                         MEM_CONTEXT_END(); | ||||
|  | ||||
|                         // If the option has a default | ||||
|                         if (found) | ||||
|                         if (cfgParseOptionalRule(&optionalRules, parseRuleOptionalTypeDefault, config->command, optionId)) | ||||
|                         { | ||||
|                             configOptionValue->set = true; | ||||
|                             configOptionValue->value = optionalRules.defaultValue; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user