[libvirt] [PATCH 2/4] Remove unnecessary check for non-NULL uuid

Jiri Denemark jdenemar at redhat.com
Mon Jun 21 09:43:40 UTC 2010


> We might also get rid of this unnecessary unreferencing and
> referencing while touching those 3 memcpys and replace
> 
>   memcpy(&(ret->uuid[0]), uuid, VIR_UUID_BUFLEN);
> 
> with
> 
>   memcpy(ret->uuid, uuid, VIR_UUID_BUFLEN);

That was my thought too. But since git grep gives about 140 of those, it seems
it's a candidate for a separate single purpose cleanup patch for all of them.
On the other hand, it looks like something a compiler could optimize. Also I
wonder if there was a reason for such strange constructs as there are so many
of them.

Jirka




More information about the libvir-list mailing list