xenconfig: Properly check retval of virDomainGraphicsListenSetAddress

The function, like others in our code, returns zero on success
and a negative value on error. However, there are two places in
xenconfig source code where we check for non-zero value. While
the function can't currently return a positive value, those
checks look okay, but does not really follow our style.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-02-10 09:34:59 +01:00
parent 5194eb9564
commit e01e1e16ef

View File

@ -868,7 +868,7 @@ xenParseSxprGraphicsOld(virDomainDefPtr def,
graphics->data.vnc.port = port;
if (listenAddr &&
virDomainGraphicsListenSetAddress(graphics, 0, listenAddr, -1, true))
virDomainGraphicsListenSetAddress(graphics, 0, listenAddr, -1, true) < 0)
goto error;
if (VIR_STRDUP(graphics->data.vnc.auth.passwd, vncPasswd) < 0)
@ -987,7 +987,7 @@ xenParseSxprGraphicsNew(virDomainDefPtr def,
graphics->data.vnc.port = port;
if (listenAddr &&
virDomainGraphicsListenSetAddress(graphics, 0, listenAddr, -1, true))
virDomainGraphicsListenSetAddress(graphics, 0, listenAddr, -1, true) < 0)
goto error;
if (VIR_STRDUP(graphics->data.vnc.auth.passwd, vncPasswd) < 0)