Re: [PATCH 12/14] Remove pointless strdup in node suspend code

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

 



On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> The command name for the suspend action does not need to be
> strdup'd. The constant string can be used directly. This
> also means the code can be trivially rearranged to make the
> switch clearer

And one less point of OOM failure.

> 
> * src/util/virnodesuspend.c: Remove strdup of cmdString
> ---
>  src/util/virnodesuspend.c |   49 +++++++++++++++-----------------------------
>  1 files changed, 17 insertions(+), 32 deletions(-)
> 

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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