Re: [systemd-devel] [PATCH] Add avoid_cleanup macro to cancel _cleanup_ of a pointer

2014-03-10 Thread Josh Triplett
On Mon, Mar 10, 2014 at 04:44:02PM +0100, Lennart Poettering wrote: > On Sat, 08.03.14 20:33, Josh Triplett (j...@joshtriplett.org) wrote: > > > avoid_cleanup also returns a copy of the pointer, making it convenient > > to use at the point where initialization completes, to hand the constructed >

Re: [systemd-devel] [PATCH] Add avoid_cleanup macro to cancel _cleanup_ of a pointer

2014-03-10 Thread Lennart Poettering
On Sat, 08.03.14 20:33, Josh Triplett (j...@joshtriplett.org) wrote: > avoid_cleanup also returns a copy of the pointer, making it convenient > to use at the point where initialization completes, to hand the constructed > object off somewhere without freeing it. > > Change all NULL assignments ta

[systemd-devel] [PATCH] Add avoid_cleanup macro to cancel _cleanup_ of a pointer

2014-03-08 Thread Josh Triplett
avoid_cleanup also returns a copy of the pointer, making it convenient to use at the point where initialization completes, to hand the constructed object off somewhere without freeing it. Change all NULL assignments tagged with /* avoid cleanup */ to use this instead. --- Seems like a common patt