Re: [PATCH v3 27/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmware/*

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

 



2013/5/3 Michal Privoznik <mprivozn@xxxxxxxxxx>:
> ---
>  src/vmware/vmware_conf.c   | 28 ++++++++++------------------
>  src/vmware/vmware_driver.c | 11 +++++------
>  2 files changed, 15 insertions(+), 24 deletions(-)
>
> diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
> index 4fb61a8..4b61a9c 100644
> --- a/src/vmware/vmware_conf.c
> +++ b/src/vmware/vmware_conf.c
> @@ -492,12 +488,8 @@ cleanup:
>  char *
>  vmwareCopyVMXFileName(const char *datastorePath, void *opaque ATTRIBUTE_UNUSED)
>  {
> -    char *path = strdup(datastorePath);
> -
> -    if (path == NULL) {
> -        virReportOOMError();
> -        return NULL;
> -    }
> +    char *path;
>
> +    ignore_value(VIR_STRDUP_QUIET(path, datastorePath));
>      return path;
>  }

Why did you remove the OOM reporting here?

--
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]