On Mon, Jan 26, 2026 at 10:50:15 +0100, Michal Privoznik via Devel wrote:
> From: Michal Privoznik <[email protected]>
> 
> So far, virDomainParseMemory() returns either 0 or -1. While this
> allows callers to distinguish a success case from an error it
> doesn't allow them to differentiate the case when no value was
> provided in the XML, thus nothing was parsed and nothing was
> required. Therefore, make virDomainParseMemory() return 1 on
> success, 0 in case nothing was parsed and nothing was required,
> and -1 on failure.
> 
> Arguably, no caller needs this distinction currently, but that is
> about to change.
> 
> Signed-off-by: Michal Privoznik <[email protected]>
> ---
>  src/conf/domain_conf.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to