From patchwork Fri Sep 16 13:55:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 670914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sbHlh0jS5z9s65 for ; Sat, 17 Sep 2016 00:31:28 +1000 (AEST) Received: from localhost ([::1]:41010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bktqp-00064x-QE for incoming@patchwork.ozlabs.org; Fri, 16 Sep 2016 10:10:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkteO-00044q-Vl for qemu-devel@nongnu.org; Fri, 16 Sep 2016 09:58:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkteJ-0007c6-5Y for qemu-devel@nongnu.org; Fri, 16 Sep 2016 09:57:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bktdN-0006kz-El; Fri, 16 Sep 2016 09:57:51 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 905317F7C0; Fri, 16 Sep 2016 13:56:26 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-33.ams2.redhat.com [10.36.112.33]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8GDuHk5024127; Fri, 16 Sep 2016 09:56:24 -0400 From: Laurent Vivier To: qemu-trivial@nongnu.org Date: Fri, 16 Sep 2016 15:55:54 +0200 Message-Id: <1474034177-17663-4-git-send-email-lvivier@redhat.com> In-Reply-To: <1474034177-17663-1-git-send-email-lvivier@redhat.com> References: <1474034177-17663-1-git-send-email-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 16 Sep 2016 13:56:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 03/26] cris: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , "Edgar E. Iglesias" , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch is the result of coccinelle script scripts/coccinelle/exit.cocci Signed-off-by: Laurent Vivier CC: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias --- hw/cris/boot.c | 4 ++-- tests/tcg/cris/check_gcctorture_pr28634-1.c | 2 +- tests/tcg/cris/check_gcctorture_pr28634.c | 2 +- tests/tcg/cris/check_glibc_kernelversion.c | 2 +- tests/tcg/cris/check_hello.c | 2 +- tests/tcg/cris/check_lz.c | 2 +- tests/tcg/cris/check_mapbrk.c | 6 +++--- tests/tcg/cris/check_mmap1.c | 2 +- tests/tcg/cris/check_mmap2.c | 2 +- tests/tcg/cris/check_mmap3.c | 2 +- tests/tcg/cris/check_openpf5.c | 2 +- tests/tcg/cris/check_stat1.c | 2 +- tests/tcg/cris/check_stat2.c | 2 +- tests/tcg/cris/check_stat3.c | 2 +- tests/tcg/cris/check_stat4.c | 2 +- tests/tcg/cris/check_time1.c | 2 +- tests/tcg/cris/check_time2.c | 2 +- tests/tcg/cris/sys.c | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/cris/boot.c b/hw/cris/boot.c index f896ed7..85ab8c4 100644 --- a/hw/cris/boot.c +++ b/hw/cris/boot.c @@ -88,13 +88,13 @@ void cris_load_image(CRISCPU *cpu, struct cris_load_info *li) if (image_size < 0) { fprintf(stderr, "qemu: could not load kernel '%s'\n", li->image_filename); - exit(1); + exit(EXIT_FAILURE); } if (li->cmdline && (kcmdline_len = strlen(li->cmdline))) { if (kcmdline_len > 256) { fprintf(stderr, "Too long CRIS kernel cmdline (max 256)\n"); - exit(1); + exit(EXIT_FAILURE); } pstrcpy_targphys("cmdline", 0x40000000, 256, li->cmdline); } diff --git a/tests/tcg/cris/check_gcctorture_pr28634-1.c b/tests/tcg/cris/check_gcctorture_pr28634-1.c index 45ecd15..ebe3f6f 100644 --- a/tests/tcg/cris/check_gcctorture_pr28634-1.c +++ b/tests/tcg/cris/check_gcctorture_pr28634-1.c @@ -11,5 +11,5 @@ main (void) y += x; if (y != x + 1) abort (); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_gcctorture_pr28634.c b/tests/tcg/cris/check_gcctorture_pr28634.c index a0c5254..52e5ef3 100644 --- a/tests/tcg/cris/check_gcctorture_pr28634.c +++ b/tests/tcg/cris/check_gcctorture_pr28634.c @@ -11,5 +11,5 @@ main (void) y += x; if (y != x + 1) abort (); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_glibc_kernelversion.c b/tests/tcg/cris/check_glibc_kernelversion.c index 0744872..ebc4959 100644 --- a/tests/tcg/cris/check_glibc_kernelversion.c +++ b/tests/tcg/cris/check_glibc_kernelversion.c @@ -112,5 +112,5 @@ int main(void) if (version < __LINUX_KERNEL_VERSION) err(); pass(); - exit(0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_hello.c b/tests/tcg/cris/check_hello.c index fb403ba..14b6fff 100644 --- a/tests/tcg/cris/check_hello.c +++ b/tests/tcg/cris/check_hello.c @@ -3,5 +3,5 @@ int main () { printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_lz.c b/tests/tcg/cris/check_lz.c index 69c2e6d..603aeac 100644 --- a/tests/tcg/cris/check_lz.c +++ b/tests/tcg/cris/check_lz.c @@ -45,5 +45,5 @@ int main(void) { check_lz(); pass(); - exit(0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_mapbrk.c b/tests/tcg/cris/check_mapbrk.c index 1aff762..8d5ec3f 100644 --- a/tests/tcg/cris/check_mapbrk.c +++ b/tests/tcg/cris/check_mapbrk.c @@ -16,7 +16,7 @@ int main () || (p6 = malloc (8191*1024)) == NULL) { printf ("fail\n"); - exit (1); + exit(EXIT_FAILURE); } free (p1); @@ -30,10 +30,10 @@ int main () if (p1 == NULL) { printf ("fail\n"); - exit (1); + exit(EXIT_FAILURE); } free (p1); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_mmap1.c b/tests/tcg/cris/check_mmap1.c index b803f0c..12a7fb5 100644 --- a/tests/tcg/cris/check_mmap1.c +++ b/tests/tcg/cris/check_mmap1.c @@ -44,5 +44,5 @@ int main (int argc, char *argv[]) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_mmap2.c b/tests/tcg/cris/check_mmap2.c index 35139a0..6c04db3 100644 --- a/tests/tcg/cris/check_mmap2.c +++ b/tests/tcg/cris/check_mmap2.c @@ -44,5 +44,5 @@ int main (int argc, char *argv[]) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_mmap3.c b/tests/tcg/cris/check_mmap3.c index 34401fa..9430177 100644 --- a/tests/tcg/cris/check_mmap3.c +++ b/tests/tcg/cris/check_mmap3.c @@ -29,5 +29,5 @@ int main (int argc, char *argv[]) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_openpf5.c b/tests/tcg/cris/check_openpf5.c index 1f86ea2..29c9ad3 100644 --- a/tests/tcg/cris/check_openpf5.c +++ b/tests/tcg/cris/check_openpf5.c @@ -52,5 +52,5 @@ int main (int argc, char *argv[]) ok: printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_stat1.c b/tests/tcg/cris/check_stat1.c index 2e2cae5..bf17527 100644 --- a/tests/tcg/cris/check_stat1.c +++ b/tests/tcg/cris/check_stat1.c @@ -12,5 +12,5 @@ int main (void) || !S_ISDIR (buf.st_mode)) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_stat2.c b/tests/tcg/cris/check_stat2.c index e36172e..e9ca81a 100644 --- a/tests/tcg/cris/check_stat2.c +++ b/tests/tcg/cris/check_stat2.c @@ -16,5 +16,5 @@ int main (void) || !S_ISDIR (buf.st_mode)) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_stat3.c b/tests/tcg/cris/check_stat3.c index 36a9d5d..3696f0d 100644 --- a/tests/tcg/cris/check_stat3.c +++ b/tests/tcg/cris/check_stat3.c @@ -21,5 +21,5 @@ int main (int argc, char *argv[]) || !S_ISREG (buf.st_mode)) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_stat4.c b/tests/tcg/cris/check_stat4.c index 04f21fe..bc28b98 100644 --- a/tests/tcg/cris/check_stat4.c +++ b/tests/tcg/cris/check_stat4.c @@ -23,5 +23,5 @@ int main (int argc, char *argv[]) || !S_ISREG (buf.st_mode)) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_time1.c b/tests/tcg/cris/check_time1.c index 3fcf0e1..92c00a3 100644 --- a/tests/tcg/cris/check_time1.c +++ b/tests/tcg/cris/check_time1.c @@ -42,5 +42,5 @@ main (void) } printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/check_time2.c b/tests/tcg/cris/check_time2.c index 20b69b4..9960866 100644 --- a/tests/tcg/cris/check_time2.c +++ b/tests/tcg/cris/check_time2.c @@ -14,5 +14,5 @@ main (void) if (t == (time_t) -1 || t != x) abort (); printf ("pass\n"); - exit (0); + exit(EXIT_SUCCESS); } diff --git a/tests/tcg/cris/sys.c b/tests/tcg/cris/sys.c index 551c5dd..ace397e 100644 --- a/tests/tcg/cris/sys.c +++ b/tests/tcg/cris/sys.c @@ -12,7 +12,7 @@ static inline int mystrlen(char *s) { void pass(void) { char s[] = "passed.\n"; write (1, s, sizeof (s) - 1); - exit (0); + exit(EXIT_SUCCESS); } void _fail(char *reason) {