Re: [PATCH] src: drop obsolete checks for virDomainConfigFile failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/17/24 16:31, Daniel P. Berrangé wrote:
> This cannot ever return NULL
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/bhyve/bhyve_driver.c    |  6 ++----
>  src/conf/domain_conf.c      |  7 ++-----
>  src/conf/virdomainobjlist.c |  9 +++------
>  src/libxl/libxl_driver.c    |  6 ++----
>  src/lxc/lxc_controller.c    |  4 +---
>  src/lxc/lxc_driver.c        | 10 ++--------
>  src/qemu/qemu_driver.c      | 22 ++++++----------------
>  7 files changed, 18 insertions(+), 46 deletions(-)

One more occurrence:

diff --git i/src/conf/domain_conf.c w/src/conf/domain_conf.c
index cae5ba9df1..3c19c89af9 100644
--- i/src/conf/domain_conf.c
+++ w/src/conf/domain_conf.c
@@ -29002,8 +29002,7 @@ virDomainDefSaveXML(virDomainDef *def,
     if (!configDir)
         return 0;
 
-    if ((configFile = virDomainConfigFile(configDir, def->name)) == NULL)
-        return -1;
+    configFile = virDomainConfigFile(configDir, def->name);
 
     if (g_mkdir_with_parents(configDir, 0777) < 0) {
         virReportSystemError(errno,

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux