This patch is the result of coccinelle script
scripts/coccinelle/exit.cocci

Signed-off-by: Laurent Vivier <lviv...@redhat.com>
CC: Aurelien Jarno <aurel...@aurel32.net>
---
 hw/sh4/r2d.c  | 6 +++---
 hw/sh4/shix.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index db373c7..537ef52 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -249,7 +249,7 @@ static void r2d_init(MachineState *machine)
     cpu = cpu_sh4_init(cpu_model);
     if (cpu == NULL) {
         fprintf(stderr, "Unable to find CPU definition\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     env = &cpu->env;
 
@@ -318,7 +318,7 @@ static void r2d_init(MachineState *machine)
                                           INITRD_LOAD_OFFSET - 
LINUX_LOAD_OFFSET);
         if (kernel_size < 0) {
           fprintf(stderr, "qemu: could not load kernel '%s'\n", 
kernel_filename);
-          exit(1);
+          exit(EXIT_FAILURE);
         }
 
         /* initialization which should be done by firmware */
@@ -338,7 +338,7 @@ static void r2d_init(MachineState *machine)
 
         if (initrd_size < 0) {
           fprintf(stderr, "qemu: could not load initrd '%s'\n", 
initrd_filename);
-          exit(1);
+          exit(EXIT_FAILURE);
         }
 
         /* initialization which should be done by firmware */
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index 14d4007..977b8e4 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -59,7 +59,7 @@ static void shix_init(MachineState *machine)
     cpu = cpu_sh4_init(cpu_model);
     if (cpu == NULL) {
         fprintf(stderr, "Unable to find CPU definition\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     /* Allocate memory space */
@@ -82,7 +82,7 @@ static void shix_init(MachineState *machine)
     ret = load_image_targphys(bios_name, 0, 0x4000);
     if (ret < 0 && !qtest_enabled()) {
         error_report("Could not load SHIX bios '%s'", bios_name);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     /* Register peripherals */
-- 
2.5.5


Reply via email to