qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH 03/26] cris: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)
Date: Fri, 16 Sep 2016 16:41:27 +0200	[thread overview]
Message-ID: <20160916144127.GT16305@toto> (raw)
In-Reply-To: <1474034177-17663-4-git-send-email-lvivier@redhat.com>

On Fri, Sep 16, 2016 at 03:55:54PM +0200, Laurent Vivier wrote:
> This patch is the result of coccinelle script
> scripts/coccinelle/exit.cocci
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> CC: Edgar E. Iglesias <edgar.iglesias@gmail.com>

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>


> ---
>  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) {
> -- 
> 2.5.5
> 


  reply	other threads:[~2016-09-16 14:45 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 13:55 [Qemu-trivial] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 01/26] coccinelle: " Laurent Vivier
2016-09-16 15:35   ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 02/26] arm: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 03/26] cris: " Laurent Vivier
2016-09-16 14:41   ` Edgar E. Iglesias [this message]
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 04/26] block: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 05/26] ppc: " Laurent Vivier
2016-09-19  5:22   ` David Gibson
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 06/26] graphics: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 07/26] tests: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 08/26] replay: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 09/26] qemu-user: " Laurent Vivier
2016-09-21 19:21   ` Riku Voipio
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 10/26] m68k: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 11/26] pci, virtio: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 12/26] sparc: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 13/26] sh4: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 14/26] x86: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 15/26] mips: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 16/26] s390: " Laurent Vivier
2016-09-19 11:07   ` Cornelia Huck
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 17/26] tcg: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 18/26] posix: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 19/26] alpha: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 20/26] common: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 21/26] misc machine: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 22/26] blockdev: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 23/26] core: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 24/26] error, trace: " Laurent Vivier
2016-09-16 15:55   ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 25/26] hw: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 26/26] net: " Laurent Vivier
2016-09-16 14:41 ` [Qemu-trivial] [Qemu-devel] [PATCH 00/26] trivial: " no-reply
2016-09-16 14:47 ` Peter Maydell
2016-09-16 15:39   ` Daniel P. Berrange
2016-09-16 15:45     ` Peter Maydell
2016-09-19  9:21       ` Markus Armbruster
2016-09-19  9:46       ` Laurent Vivier
2016-09-19 10:19         ` Peter Maydell
2016-09-19 10:32       ` Cornelia Huck
2016-09-16 15:27 ` Daniel P. Berrange
2016-09-16 15:39   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160916144127.GT16305@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).