Re: [PATCH] lib: Use more of VIR_STEAL_PTR()

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

 



On 1/28/19 2:37 PM, Ján Tomko wrote:
On Mon, Jan 28, 2019 at 02:03:07PM +0100, Michal Privoznik wrote:
From: Your Name <you@xxxxxxxxxxx>


The patch was authored by 'Your Name'... [0]

We have this very handy macro called VIR_STEAL_PTR() which steals
one pointer into the other and sets the other to NULL. The
following coccinelle patch was used to create this commit:

 @ rule1 @
 identifier a, b;
 @@

 - b = a;
   ...
 - a = NULL;
 + VIR_STEAL_PTR(b, a);

Some places were clean up afterwards to make syntax-check happy

*cleaned

(e.g. some curly braces were removed where the body become a one
liner).

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

[0] ...but it's missing their sign-off.

Ah, this is because actually I have coccinelle installed in a virtual machine of mine and I don't have git properly configured there O:-)

Anyway, fixed before pushing. Thanks.

Michal

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

  Powered by Linux