mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
5194eb9564
commit
e01e1e16ef
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user