From patchwork Wed May 24 01:14:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9744863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 431746032C for ; Wed, 24 May 2017 01:15:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 353EA28871 for ; Wed, 24 May 2017 01:15:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2964728877; Wed, 24 May 2017 01:15:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D913628871 for ; Wed, 24 May 2017 01:15:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FA4C6E3E7; Wed, 24 May 2017 01:14:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 491516E3E4 for ; Wed, 24 May 2017 01:14:56 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 23 May 2017 18:14:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,383,1491289200"; d="scan'208";a="860622830" Received: from dtbarclx-mobl2.amr.corp.intel.com (HELO delly.amr.corp.intel.com) ([10.254.98.64]) by FMSMGA003.fm.intel.com with ESMTP; 23 May 2017 18:14:54 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Wed, 24 May 2017 02:14:48 +0100 Message-Id: <20170524011449.24349-3-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170524011449.24349-1-lionel.g.landwerlin@intel.com> References: <20170524011449.24349-1-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH 2/3] aubinator: be consistent on exit code X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We're using both exit(1) & exit(EXIT_FAILURE), settle for one, same for success. Signed-off-by: Lionel Landwerlin --- src/intel/tools/aubinator_error_decode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index 506d39012b8..a41292238cb 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -587,7 +587,7 @@ read_data_file(FILE *file) count = ascii85_decode(line+1, &data, line[0] == ':'); if (count == 0) { fprintf(stderr, "ASCII85 decode failed.\n"); - exit(1); + exit(EXIT_FAILURE); } if (strcmp(buffer_name, "user") == 0) { @@ -718,7 +718,7 @@ read_data_file(FILE *file) data = realloc(data, data_size * sizeof (uint32_t)); if (data == NULL) { fprintf(stderr, "Out of memory.\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -824,7 +824,7 @@ main(int argc, char *argv[]) if (help || argc == 1) { print_help(argv[0], stderr); - exit(0); + exit(EXIT_SUCCESS); } if (optind >= argc) { @@ -847,7 +847,7 @@ main(int argc, char *argv[]) } } else { read_data_file(stdin); - exit(0); + exit(EXIT_SUCCESS); } } else { path = argv[optind]; @@ -855,7 +855,7 @@ main(int argc, char *argv[]) if (error != 0) { fprintf(stderr, "Error opening %s: %s\n", path, strerror(errno)); - exit(1); + exit(EXIT_FAILURE); } }