qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 26/26] net: use exit(EXIT_SUCCESS) and exit(EXIT_FAI


From: Laurent Vivier
Subject: [Qemu-devel] [PATCH 26/26] net: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)
Date: Fri, 16 Sep 2016 15:56:17 +0200

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

Signed-off-by: Laurent Vivier <address@hidden>
CC: Jason Wang <address@hidden>
---
 net/net.c    | 4 ++--
 slirp/misc.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/net.c b/net/net.c
index d51cb29..0215618 100644
--- a/net/net.c
+++ b/net/net.c
@@ -840,9 +840,9 @@ void qemu_check_nic_model(NICInfo *nd, const char *model)
     models[1] = NULL;
 
     if (qemu_show_nic_models(nd->model, models))
-        exit(0);
+        exit(EXIT_SUCCESS);
     if (qemu_find_nic_model(nd, models, model) < 0)
-        exit(1);
+        exit(EXIT_FAILURE);
 }
 
 int qemu_find_nic_model(NICInfo *nd, const char * const *models,
diff --git a/slirp/misc.c b/slirp/misc.c
index 88e9d94..9ceb822 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -172,7 +172,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
         fprintf(stderr, "Error: execvp of %s failed: %s\n",
                 argv[0], strerror(errno));
                close(0); close(1); close(2); /* XXX */
-               exit(1);
+                exit(EXIT_FAILURE);
 
         default:
                qemu_add_child_watch(pid);
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]