From patchwork Thu May 17 01:36:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 10405171 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 0B153602C2 for ; Thu, 17 May 2018 01:47:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED25E2887D for ; Thu, 17 May 2018 01:47:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF881288BB; Thu, 17 May 2018 01:47:52 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D0C52887D for ; Thu, 17 May 2018 01:47:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbeEQBrw (ORCPT ); Wed, 16 May 2018 21:47:52 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23004 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751332AbeEQBrv (ORCPT ); Wed, 16 May 2018 21:47:51 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="40018681" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 May 2018 09:47:49 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 5E6674B3ED6D; Thu, 17 May 2018 09:47:48 +0800 (CST) Received: from RHEL7U5Alpha_SERVER.g08.fujitsu.local (10.167.220.185) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.399.0; Thu, 17 May 2018 09:47:47 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH] generic/486: Get rid of the redundant error=%d printing Date: Thu, 17 May 2018 09:36:10 +0800 Message-ID: <1526520970-17213-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20180516152714.GA4910@magnolia> References: <20180516152714.GA4910@magnolia> MIME-Version: 1.0 X-Originating-IP: [10.167.220.185] X-yoursite-MailScanner-ID: 5E6674B3ED6D.AAF9C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 1) Without the fix, perror() can indicate the actual error(ENODATA). 2) After calling perror() and redirecting the output of perror() to a file, errno seems to be set to EINVAL unexpectedly. See the following mail for detailed info: https://www.spinics.net/lists/fstests/msg09675.html Signed-off-by: Xiao Yang --- src/attr_replace_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c index 23adc07..33fa74d 100644 --- a/src/attr_replace_test.c +++ b/src/attr_replace_test.c @@ -11,7 +11,6 @@ #include #define die() do { perror(""); \ -fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \ exit(1); } while (0) #define fail(...) do { \