On 11/24/21 17:12, Kristina Hanicova wrote: > These functions always return success so it seems logical to not > return anything and remove unnecessary checks. > > Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> > --- > src/qemu/qemu_alias.c | 78 +++++++++++++++++------------------------ > src/qemu/qemu_alias.h | 34 +++++++++--------- > src/qemu/qemu_hotplug.c | 34 +++++++----------- > 3 files changed, 61 insertions(+), 85 deletions(-) Ooops, not rebased onto current master :-) But the conflict resolution was trivial. I think I see some more functions that can't fail really (can be fixed in a follow up), for instance: qemuAssignDeviceChrAlias() can fail if and only if qemuGetNextChrDevIndex() fails, but that can never happen. This leaves us with qemuAssignDeviceDiskAlias() and qemuAssignDeviceMemoryAlias(). In the latter, the error is returned only in enum overflow (which I believe is a dead code). In the former -1 is returned if qemuDomainFindSCSIControllerModel() fails, but controllers should have been autofilled at this point. Michal