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

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

 



> 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

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