diff mbox

[10/26] m68k: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)

Message ID 1474034177-17663-11-git-send-email-lvivier@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Vivier Sept. 16, 2016, 1:56 p.m. UTC
This patch is the result of coccinelle script
scripts/coccinelle/exit.cocci

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/m68k/an5206.c     | 6 +++---
 hw/m68k/dummy_m68k.c | 4 ++--
 hw/m68k/mcf5208.c    | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 142bab9..9c2cb1e 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -45,7 +45,7 @@  static void an5206_init(MachineState *machine)
     cpu = cpu_m68k_init(cpu_model);
     if (!cpu) {
         error_report("Unable to find m68k CPU definition");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     env = &cpu->env;
 
@@ -72,7 +72,7 @@  static void an5206_init(MachineState *machine)
             return;
         }
         fprintf(stderr, "Kernel image must be specified\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
@@ -89,7 +89,7 @@  static void an5206_init(MachineState *machine)
     }
     if (kernel_size < 0) {
         fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     env->pc = entry;
diff --git a/hw/m68k/dummy_m68k.c b/hw/m68k/dummy_m68k.c
index 0b11d20..09981a0 100644
--- a/hw/m68k/dummy_m68k.c
+++ b/hw/m68k/dummy_m68k.c
@@ -37,7 +37,7 @@  static void dummy_m68k_init(MachineState *machine)
     cpu = cpu_m68k_init(cpu_model);
     if (!cpu) {
         fprintf(stderr, "Unable to find m68k CPU definition\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     env = &cpu->env;
 
@@ -67,7 +67,7 @@  static void dummy_m68k_init(MachineState *machine)
         if (kernel_size < 0) {
             fprintf(stderr, "qemu: could not load kernel '%s'\n",
                     kernel_filename);
-            exit(1);
+            exit(EXIT_FAILURE);
         }
     } else {
         entry = 0;
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 2415557..3c833ba 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -213,7 +213,7 @@  static void mcf5208evb_init(MachineState *machine)
     cpu = cpu_m68k_init(cpu_model);
     if (!cpu) {
         fprintf(stderr, "Unable to find m68k CPU definition\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     env = &cpu->env;
 
@@ -241,7 +241,7 @@  static void mcf5208evb_init(MachineState *machine)
 
     if (nb_nics > 1) {
         fprintf(stderr, "Too many NICs\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     if (nd_table[0].used)
         mcf_fec_init(address_space_mem, &nd_table[0],
@@ -275,7 +275,7 @@  static void mcf5208evb_init(MachineState *machine)
             return;
         }
         fprintf(stderr, "Kernel image must be specified\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
@@ -292,7 +292,7 @@  static void mcf5208evb_init(MachineState *machine)
     }
     if (kernel_size < 0) {
         fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     env->pc = entry;