From patchwork Tue Jun 12 19:31:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10460997 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 6573A603B4 for ; Tue, 12 Jun 2018 19:31:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53DF5289C9 for ; Tue, 12 Jun 2018 19:31:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42186289DC; Tue, 12 Jun 2018 19:31:54 +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 EC3B8289C9 for ; Tue, 12 Jun 2018 19:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589AbeFLTbw (ORCPT ); Tue, 12 Jun 2018 15:31:52 -0400 Received: from sandeen.net ([63.231.237.45]:54622 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753517AbeFLTbt (ORCPT ); Tue, 12 Jun 2018 15:31:49 -0400 Received: by sandeen.net (Postfix, from userid 500) id 5187E4872C8; Tue, 12 Jun 2018 14:31:26 -0500 (CDT) From: Eric Sandeen To: linux-xfs@vger.kernel.org Subject: [PATCH 7/7] mkfs: remove gotos in parse_defaults_file Date: Tue, 12 Jun 2018 14:31:23 -0500 Message-Id: <1528831883-21879-8-git-send-email-sandeen@sandeen.net> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1528831883-21879-1-git-send-email-sandeen@sandeen.net> References: <1528831883-21879-1-git-send-email-sandeen@sandeen.net> Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There's no point to the gotos in parse_defaults_file; no cleanup etc that is normally facilitated by a goto, so just remove them. Signed-off-by: Eric Sandeen Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong --- mkfs/config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mkfs/config.c b/mkfs/config.c index 173ab9a..f9ca78a 100644 --- a/mkfs/config.c +++ b/mkfs/config.c @@ -636,17 +636,15 @@ parse_defaults_file( fp = fdopen(fd, "r"); if (!fp) - goto out; + return -1; ret = parse_config_stream(dft, config_file, fp); if (ret) { fclose(fp); - goto out; + return -1; } printf(_("config-file=%s\n"), config_file); return 0; -out: - return -1; }