From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bktkU-0000fB-U2 for qemu-devel@nongnu.org; Fri, 16 Sep 2016 10:04:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bktkO-0005fC-UL for qemu-devel@nongnu.org; Fri, 16 Sep 2016 10:04:14 -0400 From: Laurent Vivier Date: Fri, 16 Sep 2016 15:56:17 +0200 Message-Id: <1474034177-17663-27-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> Subject: [Qemu-devel] [PATCH 26/26] net: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: qemu-devel@nongnu.org, Laurent Vivier , Jason Wang This patch is the result of coccinelle script scripts/coccinelle/exit.cocci Signed-off-by: Laurent Vivier CC: Jason Wang --- 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