Received: from eggs.gnu.org ([2001:4830:134:3::10]:59813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkvB6-0005tx-UN for qemu-devel@nongnu.org; Fri, 16 Sep 2016 11:35:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkvB2-0007A0-Tj for qemu-devel@nongnu.org; Fri, 16 Sep 2016 11:35:48 -0400 References: <1474034177-17663-1-git-send-email-lvivier@redhat.com> <1474034177-17663-2-git-send-email-lvivier@redhat.com> From: Eric Blake Message-ID: <21c7213a-c4d3-ac89-7729-5ee90113c354@redhat.com> Date: Fri, 16 Sep 2016 10:35:42 -0500 MIME-Version: 1.0 In-Reply-To: <1474034177-17663-2-git-send-email-lvivier@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SvRojQOW84sJHpcoDFtUslld1HT9PE1bN" Subject: Re: [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-trivial@nongnu.org Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SvRojQOW84sJHpcoDFtUslld1HT9PE1bN From: Eric Blake To: Laurent Vivier , qemu-trivial@nongnu.org Cc: qemu-devel@nongnu.org Message-ID: <21c7213a-c4d3-ac89-7729-5ee90113c354@redhat.com> Subject: Re: [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) References: <1474034177-17663-1-git-send-email-lvivier@redhat.com> <1474034177-17663-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1474034177-17663-2-git-send-email-lvivier@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >=20 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.co= cci > 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) > +) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SvRojQOW84sJHpcoDFtUslld1HT9PE1bN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX3BFOAAoJEKeha0olJ0Nqq1wH/3zercjpoCrnV8OhJGVlKtje d0GSS/ZOCWcH+8X8O2DUhvfr5mbte0OF2WoGWuiDHcxS3r/yz0iS+rvUBnxpADOR OSrZjyS/ssGvfcu6c20r5rMIVELIBy4H2i9quKOrDU99Zm3cL6fhR6Py+N7qh62t Ss+f0xlxLsID1t+uGfvZPrXxAgVDrLad+CiG6+qNUrUTmW8yu3IMWnsKp5Frz37E dHWgNx4epnlBc7gNe3Aj7CxQ2ecnWZ0VIYzf8HSlYiV4kjiX/NlDIZ+vB2dtegNk sg29c5icmyHuE/TSo04duG9gM2Bt8UYMWLB7V7f4b6Pwl0dubtAAPyDg/OV01GU= =Nfl1 -----END PGP SIGNATURE----- --SvRojQOW84sJHpcoDFtUslld1HT9PE1bN--