From: Peter Krempa Date: Tue, 4 Oct 2022 14:29:33 +0000 (+0200) Subject: virNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong X-Git-Tag: v8.10.0-rc1~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7281dd014b264a7c68d8a3b25f54836433925fd;p=thirdparty%2Flibvirt.git virNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong Fix the function argument to properly spell out 'unsigned int' and use virXPathUInt instead of virXPathULong and a temporary value. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index f5283a77b3..a5af936b9a 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -833,15 +833,14 @@ virNodeDevCapsDefParseIntOptional(const char *xpath, static int virNodeDevCapsDefParseULong(const char *xpath, xmlXPathContextPtr ctxt, - unsigned *value, + unsigned int *value, virNodeDeviceDef *def, const char *missing_error_fmt, const char *invalid_error_fmt) { int ret; - unsigned long val; - ret = virXPathULong(xpath, ctxt, &val); + ret = virXPathUInt(xpath, ctxt, value); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, ret == -1 ? missing_error_fmt : invalid_error_fmt, @@ -849,7 +848,6 @@ virNodeDevCapsDefParseULong(const char *xpath, return -1; } - *value = val; return 0; }