On 01/24/2017 10:40 AM, Michal Privoznik wrote:
We use @ret to hold the actual return value of the function we
are currently in. To hold a return value of a function called we
use different variables: @rv, @rc, etc. Honour this naming
scheme in virDomainNetDefParseXML too.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_conf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b9092bdde..26bb0fdd0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9343,7 +9343,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
virNWFilterHashTablePtr filterparams = NULL;
virDomainActualNetDefPtr actual = NULL;
xmlNodePtr oldnode = ctxt->node;
- int ret, val;
+ int rv, val;
if (VIR_ALLOC(def) < 0)
return NULL;
@@ -10041,10 +10041,10 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
}
}
- ret = virXPathULong("string(./tune/sndbuf)", ctxt,
&def->tune.sndbuf);
- if (ret >= 0) {
+ rv = virXPathULong("string(./tune/sndbuf)", ctxt,
&def->tune.sndbuf);
+ if (rv >= 0) {
def->tune.sndbuf_specified = true;
- } else if (ret == -2) {
+ } else if (rv == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("sndbuf must be a positive integer"));
goto error;
I guess you're doing this because you don't like the fact that it's
called ret but we're not actually returning it? Yeah, I'll buy that
<ObamaWithBeerThumbsUp/>.
ACK.