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

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



On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> 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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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