From patchwork Mon Mar 6 00:50:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 735504 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vc1Sy03xDz9s83 for ; Mon, 6 Mar 2017 11:51:46 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ORKahclG"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VA+gVJ7G"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eJQt/+/+nK1wjyJRXiBr5nOdX6z+HjTbgqqSXBcPNtg=; b=ORKahclGeG+YVx P+yFNFPI3Pfl1tGtHrrxC89mt/Hz/TMkMSIx5QsCSXuQLCiIiLueSMifoYixdk698na9Pi68VIgnK bFffoC7SkvWvmO4m8VHGD9aEXoVFuXhFQ3UxvaK4cGtcr4Ol0qZz529hhwxVMe3SqTnLcQ8MjnxNh lAyoT2is/6+mVkX4FVIdTNAASKH7JvSXNQXPUNRAi8F/OP8TELSBmKE41e/y3xHiqgM1AZS7aOYuJ NubCS3hbaw3+EqVelCSyQ8nl5LWblJgasPM+dzHCKPcBoXypsUie9gs18rN9v0KPBdelMM8cKKr94 HICT8nQn4atU1XxHuN2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckgsH-00072C-S6; Mon, 06 Mar 2017 00:51:41 +0000 Received: from mail-ot0-x242.google.com ([2607:f8b0:4003:c0f::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckgrM-0006bo-IF for lede-dev@lists.infradead.org; Mon, 06 Mar 2017 00:50:48 +0000 Received: by mail-ot0-x242.google.com with SMTP id i1so15990175ota.3 for ; Sun, 05 Mar 2017 16:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/Rz8OnR4UDFLBsaTFoxCkYB3kOsMGI7xxbayKD0z1VI=; b=VA+gVJ7GW7ovBCDUyuulIs0q7XpJETT/Xp0b3h3a+eD517FdDBJ9+LFCW0HToLF5wW +HWzn5wjENbekUtFjJN9btRRCUZxaJZ5TWuMtb0MmyImxvG2CWUi/IPgljYR7Eq8v5qi d5pKSecFsM/yISw2zNjz+hBGVSC5VP1llxUTUqnFvSAxcXLcaDvYTmuoakWF3mvMIGqo sufxZhECr2iQI764+3D3qN56IiT5Wz8YPeZ4jzA3G75s7VFGvx/cDA4CYSTuEjesHv9Y GcEfY3jY2mKtpjkUUDfQIVzFXuwa6dwkEPFelo/abDeWq0XY0HTx7uLAuelWEWeQT5vC ct6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/Rz8OnR4UDFLBsaTFoxCkYB3kOsMGI7xxbayKD0z1VI=; b=PoH79R6WOkfSVabKMniat8BIeLg1yloaEcNQcpL8YMiYKIuDcH2HL/a1WtVgcxtnE8 OUn2dm8OZDZj+bNoDfVwon6ZMU2pgu8INBl5tY6DOaZXu7ggzbzPwSk+Riek+GDdtUtD n1bkhgTyc+qKLnfhNQSTqhiSNKQlBVzUMqHHArLTgeEtvaFGtlen/Vn0CW2PV6sH6DM6 FCTtCHK1F6u28NEo0OW0Ebr+iptucQti6FB/bADRsD9QRdK26KmGAxp0bk3nxfnzW5uL T3CJu3U0lnjtIVtWouFpfzmGN9JB2x+GXOIJrL/TgNzmRH6iDmTkqio+l/knEE5AqiCx I76A== X-Gm-Message-State: AMke39m9BVV5PWPuoZ7dqFFF5mW0HbO2ffD5/RQIkN9JIKjt/BvbABUhADF3PlKOjq2thw== X-Received: by 10.157.19.81 with SMTP id q17mr6241995otq.198.1488761424281; Sun, 05 Mar 2017 16:50:24 -0800 (PST) Received: from fainelli-laptop.lan ([2001:470:d:73f:a116:863b:e34d:e904]) by smtp.gmail.com with ESMTPSA id s11sm8073672oia.15.2017.03.05.16.50.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Mar 2017 16:50:23 -0800 (PST) From: Florian Fainelli To: lede-dev@lists.infradead.org Date: Sun, 5 Mar 2017 16:50:16 -0800 Message-Id: <20170306005016.21123-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170306005016.21123-1-f.fainelli@gmail.com> References: <20170306005016.21123-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170305_165046_648832_AAF3CEA7 X-CRM114-Status: UNSURE ( 7.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4003:c0f:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH mountd 5/5] mountd: Fix unused result in mount.c for fgets() X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , john@phrozen.org MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fixes the following warning: mountd-2016-12-19-dd5799c9/mount.c: In function 'mount_dev_get_property': mountd-2016-12-19-dd5799c9/mount.c:454:3: error: 'model' undeclared (first use in this function) model[strlen(prop_val) - 1] = '\0'; ^ Signed-off-by: Florian Fainelli --- mount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mount.c b/mount.c index fd5d073ca3eb..9607acdd8c5a 100644 --- a/mount.c +++ b/mount.c @@ -532,8 +532,10 @@ static void mount_dev_add(char *dev) if(!fp) snprintf(sector_size, 64, "unknown"); else { - fgets(sector_size, 64, fp); - sector_size[strlen(sector_size) - 1] = '\0'; + if (!fgets(sector_size, 64, fp)) + snprintf(sector_size, 64, "unknown"); + else + sector_size[strlen(sector_size) - 1] = '\0'; fclose(fp); } snprintf(tmp, 64, "/dev/%s", dev);