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

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



> 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


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