On 09/16/2016 08:55 AM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > scripts/coccinelle/exit.cocci | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > create mode 100644 scripts/coccinelle/exit.cocci > Script itself is fine. Whether to apply it throughout the tree is a cosmetic question, but I'm in favor of it; and the script will help us keep the tree clean. Do we need/want to update HACKING to mention our new enforced style as well, later in the series? Reviewed-by: Eric Blake However, Coccinelle doesn't seem to catch comments; your series has missed at least the 'exit(1)' in the comments of include/qapi/error.h. > diff --git a/scripts/coccinelle/exit.cocci b/scripts/coccinelle/exit.cocci > new file mode 100644 > index 0000000..73386c0 > --- /dev/null > +++ b/scripts/coccinelle/exit.cocci > @@ -0,0 +1,12 @@ > +// replace exit(0) by exit(EXIT_SUCCESS) > +// exit(1) by exit(EXIT_FAILURE) > + > +@@ > +@@ > +( > +- exit(0) > ++ exit(EXIT_SUCCESS) > +| > +- exit(1) > ++ exit(EXIT_FAILURE) > +) > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org