From 3da880156b4a56a6af5065ac10dfd6833cdcb1d4 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 3 Feb 2017 13:09:23 -0800 Subject: Replace _exit(-1) with _exit(EXIT_FAILURE). -1 is not a valid exit status. Also replace a few exit(1) with exit(EXIT_FAILURE). Test: mmma bootable/recovery Change-Id: I4596c8328b770bf95acccc06a4401bd5cabd4bfd --- recovery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index 25d3546e3..29d7ab889 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -243,7 +243,7 @@ static void redirect_stdio(const char* filename) { if (log_fp == nullptr) { PLOG(ERROR) << "fopen \"" << filename << "\" failed"; close(pipefd[0]); - _exit(1); + _exit(EXIT_FAILURE); } FILE* pipe_fp = fdopen(pipefd[0], "r"); @@ -251,7 +251,7 @@ static void redirect_stdio(const char* filename) { PLOG(ERROR) << "fdopen failed"; check_and_fclose(log_fp, filename); close(pipefd[0]); - _exit(1); + _exit(EXIT_FAILURE); } char* line = nullptr; @@ -273,7 +273,7 @@ static void redirect_stdio(const char* filename) { free(line); check_and_fclose(log_fp, filename); close(pipefd[0]); - _exit(1); + _exit(EXIT_FAILURE); } else { // Redirect stdout/stderr to the logger process. // Close the unused read end. -- cgit v1.2.3