mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +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,16 +672,14 @@ 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);
|
||||
virBufferEscapeString(&buf, "<devnode type='dev'>%s</devnode>\n",
|
||||
def->devnode);
|
||||
if (def->devlinks) {
|
||||
for (i = 0; def->devlinks[i]; i++)
|
||||
virBufferEscapeString(&buf, "<devnode type='link'>%s</devnode>\n",
|
||||
def->devlinks[i]);
|
||||
}
|
||||
if (def->parent)
|
||||
virBufferEscapeString(&buf, "<parent>%s</parent>\n", def->parent);
|
||||
virBufferEscapeString(&buf, "<parent>%s</parent>\n", def->parent);
|
||||
if (def->driver) {
|
||||
virBufferAddLit(&buf, "<driver>\n");
|
||||
virBufferAdjustIndent(&buf, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user