mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
node_device: remove unnecessary checks in virNodeDeviceDefFormat
virBufferEscapeString already contains the null check. Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c877908e14
commit
c65c078655
@ -672,7 +672,6 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def)
|
||||
virBufferAdjustIndent(&buf, 2);
|
||||
virBufferEscapeString(&buf, "<name>%s</name>\n", def->name);
|
||||
virBufferEscapeString(&buf, "<path>%s</path>\n", def->sysfs_path);
|
||||
if (def->devnode)
|
||||
virBufferEscapeString(&buf, "<devnode type='dev'>%s</devnode>\n",
|
||||
def->devnode);
|
||||
if (def->devlinks) {
|
||||
@ -680,7 +679,6 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def)
|
||||
virBufferEscapeString(&buf, "<devnode type='link'>%s</devnode>\n",
|
||||
def->devlinks[i]);
|
||||
}
|
||||
if (def->parent)
|
||||
virBufferEscapeString(&buf, "<parent>%s</parent>\n", def->parent);
|
||||
if (def->driver) {
|
||||
virBufferAddLit(&buf, "<driver>\n");
|
||||
|
Loading…
Reference in New Issue
Block a user