Or You Could Simplify The Error-Recovery Paths
Or You Could Simplify The Error-Recovery Paths
Posted Dec 29, 2014 19:23 UTC (Mon) by cesarb (subscriber, #6266)In reply to: Or You Could Simplify The Error-Recovery Paths by rleigh
Parent article: The "too small to fail" memory-allocation rule
If you are willing to use GNU extensions, you can have it on C too via __attribute__((__cleanup__(...))). One well-known project which uses it is systemd.
But I agree that it's not going to be acceptable in the kernel, since it introduces implicit calls to the cleanup functions, and kernel developers prefer to be explicit.
Posted Dec 29, 2014 23:11 UTC (Mon)
by rleigh (guest, #14622)
[Link] (2 responses)
Posted Dec 30, 2014 23:28 UTC (Tue)
by cesarb (subscriber, #6266)
[Link] (1 responses)
Posted Dec 31, 2014 11:17 UTC (Wed)
by rleigh (guest, #14622)
[Link]
Or You Could Simplify The Error-Recovery Paths
Or You Could Simplify The Error-Recovery Paths
Or You Could Simplify The Error-Recovery Paths