From patchwork Thu Jul 31 03:23:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4653121 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0044AC0338 for ; Thu, 31 Jul 2014 03:29:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DB43201B4 for ; Thu, 31 Jul 2014 03:29:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71DC92018E for ; Thu, 31 Jul 2014 03:29:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756188AbaGaD3r (ORCPT ); Wed, 30 Jul 2014 23:29:47 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:42243 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756138AbaGaD3o (ORCPT ); Wed, 30 Jul 2014 23:29:44 -0400 X-IronPort-AV: E=Sophos;i="5.00,999,1396972800"; d="scan'208";a="33996460" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 31 Jul 2014 11:26:55 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s6V3TfGb008708 for ; Thu, 31 Jul 2014 11:29:41 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 31 Jul 2014 11:29:53 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH 2/3] btrfs-progs: remove unnecessary return value check in btrfs-property Date: Thu, 31 Jul 2014 11:23:43 +0800 Message-ID: <1406777024-7647-2-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1406777024-7647-1-git-send-email-guihc.fnst@cn.fujitsu.com> References: <1406777024-7647-1-git-send-email-guihc.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function @parse_prop() returns either -1 or 0, no need to check for other values. Just return the unnecessary check. Signed-off-by: Gui Hecheng --- cmds-property.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmds-property.c b/cmds-property.c index 90c7603..a764293 100644 --- a/cmds-property.c +++ b/cmds-property.c @@ -276,10 +276,6 @@ static int setget_prop(int types, const char *object, fprintf(stderr, "ERROR: property is unknown\n"); ret = 40; goto out; - } else if (ret) { - fprintf(stderr, "ERROR: parse_prop reported unknown error\n"); - ret = 42; - goto out; } types &= prop->types;