[PATCH 2 of 3] inotify: _inotify.c: do not use "goto bail" and XDECREF's when returns can do
bos at serpentine.com
Mon Aug 31 12:31:53 CDT 2009
On Thu, Aug 27, 2009 at 3:01 AM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> inotify: _inotify.c: do not use "goto bail" and XDECREF's when returns can
> Using gotos hurt code readability: it's not necessary to put a goto to a
> containing fail-safe instructions (Py_CLEAR, Py_XDECREF do not fail if the
> the target is NULL) when a simple "return NULL" can do instead.
NAK. Scattering the cleanup code throughout the body of the function is an
excellent way of introducing resource leaks. The current code is more
readable and robust.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel