[libvirt] [PATCH 12/14] Remove pointless strdup in node suspend code
Eric Blake
eblake at redhat.com
Tue Nov 29 16:52:21 UTC 2011
On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at 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 at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111129/446191c5/attachment-0001.sig>
More information about the libvir-list
mailing list