mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: remove unnecessary NULL checks
Just above in the function, we return from the function if either x or y are NULL, so there's no need to re-check whether x or y are NULL. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
cda4d4d212
commit
90c737bbd9
@ -15333,21 +15333,17 @@ virDomainVideoResolutionDefParseXML(xmlNodePtr node)
|
|||||||
if (VIR_ALLOC(def) < 0)
|
if (VIR_ALLOC(def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (x) {
|
|
||||||
if (virStrToLong_uip(x, NULL, 10, &def->x) < 0) {
|
if (virStrToLong_uip(x, NULL, 10, &def->x) < 0) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("cannot parse video x-resolution '%s'"), x);
|
_("cannot parse video x-resolution '%s'"), x);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (y) {
|
|
||||||
if (virStrToLong_uip(y, NULL, 10, &def->y) < 0) {
|
if (virStrToLong_uip(y, NULL, 10, &def->y) < 0) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("cannot parse video y-resolution '%s'"), y);
|
_("cannot parse video y-resolution '%s'"), y);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return def;
|
return def;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user