Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp904060rwb; Thu, 18 Aug 2022 14:34:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hXuWwcJnaBfG60DQl72u8B/kIeYbs8K92lMYiri0dy2wGahfCbvHcQd7zHA1Cz7EvsA4k X-Received: by 2002:a17:906:ee8e:b0:730:3646:d178 with SMTP id wt14-20020a170906ee8e00b007303646d178mr3044309ejb.426.1660858440288; Thu, 18 Aug 2022 14:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660858440; cv=none; d=google.com; s=arc-20160816; b=xNhmme+dezJAxeGo6W0YDf1m1vRuP5TIrluWuNBGswfhwrpp2EgPW/15wsGCHBMlwS xkVB65A5oGungbZAlzWQrEtaE+fWew0HT5ZRpQoXHlpNA7jtaBRXRxiseyEwnTQogvUt uv28lxLroSNB1LrUTkz5IjZSfoi6I+PUhhjtS6+3U0ngVmIEIBfb2eJJE6yZoUfYyS7H AKbHHY+n7M+7CRp1j6tCI0uxlY1+jzM+n/GcDNSQRzHzd+VJqogwo9HE29Iih+biKq3/ zt4hNHWc+bvzrY6ULTPPhwsdEa4/J+Cs8Qa1PMe8ERRgE0EzoMV9tfByOOfwGmqLOKh+ TNGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bGwscLXY7jmI7PssNnEkujDIzqYd6kVG11JA8pLiQcU=; b=IgHMIJML4aacL05sx+tbzpGmgwp8crodIc/5eU2FPcl72QpwljXGRgh4/D/OeBN2R1 XYf9J0QLKCPUXZZeoMEIYtmHDD49S7WbFycFE86e+1jpm6BAhueXHh0JpGQIr+x/QVQq f11Ozd9eJSPXHbD0vC+Evkff0EGqCkGDYjzOzhuoEYV2e68S/fkOXhFPzusbMxg3QdUZ J1MHLK7c3CFTPLBBL9udUEWKhes4pjVsRY2HUL/qh0HhMcvNv+la3dpHsM4PPfWTxMFR BaWwj3xwSiw0uJuywlUmW1W71XTu93tGb0Lj7VLZRZcroeT+K7i1qBaguBu8kWVbAdP0 KcwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=rUhDLmCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu8-20020a170907a08800b00710487d3a4fsi1522960ejc.67.2022.08.18.14.33.30; Thu, 18 Aug 2022 14:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=rUhDLmCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346637AbiHRVJy (ORCPT + 99 others); Thu, 18 Aug 2022 17:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346514AbiHRVJW (ORCPT ); Thu, 18 Aug 2022 17:09:22 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09C09D3993 for ; Thu, 18 Aug 2022 14:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=aMYZBNOjf/WHCs UrAFZm+J4XfZ3nHNhtn8XZSCDyD7A=; b=rUhDLmCtm3lbAOu6xAIzZtzekToZY2 Ms3YtoIq2vSLre2gta1npOsXwUsawPpeGzMCvak3bSaqauyyUFysNUbuOLSCAAhK apgO3xhwVawADATXFLhyJAhp1vdKLRRUMn8l/m0envct8/pq+8m65p9Ggmm0N+MY AvKq2Yb0RSyng= Received: (qmail 3961904 invoked from network); 18 Aug 2022 23:01:25 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:01:25 +0200 X-UD-Smtp-Session: l3s3148p1@kRXRSIrm7Zoucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , reiserfs-devel@vger.kernel.org Subject: [PATCH 02/14] reiserfs: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:01:11 +0200 Message-Id: <20220818210123.7637-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220818210123.7637-1-wsa+renesas@sang-engineering.com> References: <20220818210123.7637-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang --- fs/reiserfs/procfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index 4a7cb16e9345..3dba8acf4e83 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c @@ -411,7 +411,7 @@ int reiserfs_proc_info_init(struct super_block *sb) char *s; /* Some block devices use /'s */ - strlcpy(b, sb->s_id, BDEVNAME_SIZE); + strscpy(b, sb->s_id, BDEVNAME_SIZE); s = strchr(b, '/'); if (s) *s = '!'; @@ -441,7 +441,7 @@ int reiserfs_proc_info_done(struct super_block *sb) char *s; /* Some block devices use /'s */ - strlcpy(b, sb->s_id, BDEVNAME_SIZE); + strscpy(b, sb->s_id, BDEVNAME_SIZE); s = strchr(b, '/'); if (s) *s = '!'; -- 2.35.1