From patchwork Thu Dec 28 02:56:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 183623 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1778428dyb; Wed, 27 Dec 2023 18:56:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+ixMmq69Ks7L+/sRD0LV0fomLAWw2IIf051iKcEMzisq/u83isMRNUU4duUUC31KL6FTT X-Received: by 2002:a17:90a:4811:b0:28c:5018:e05e with SMTP id a17-20020a17090a481100b0028c5018e05emr1774444pjh.44.1703732218325; Wed, 27 Dec 2023 18:56:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703732218; cv=none; d=google.com; s=arc-20160816; b=XenqWMWRov9tL1fWWQaoXbjs6B+Y4LdR3Om/1D7Wl0j69a/mjbxSuSBcTqE4T0TOs7 rNJawb0GrMjf0qtjCcU6UP2YAKE+PubWAnLMvbYuNizURt14mS32kwBN4GUI2HY/Y8DR VG+FmcFoV8mNNc2Oxr+RZflnyatj5DvRRFBe/kf0TRLDrE3Cytexn2AX3WkxQNwAcYWd 1vUrwTK/+FESUzvC7/Lg2vsUFgC2zLbcHzRl2Vjxf9PARVmQV6mMvzZXE9MATU2c29FI 062A/pLvQpbYW+68gDFYVkyWYHdcZ5Cj/IzSlMSXudPNB97QZWIT0nkf26Ee03fBHo9H znPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=zSUAZjDz4uARrlJUuexZUvIlSyJ4iHR/aLgbeFHdjzM=; fh=F3FC/btZPaHbBdlGiVSwz294weEVs8moQlGRnHDAm6U=; b=XFzqgiyNO0J4SvdpELpFhd2G5++KVnbqm/mYy0DXGdAiYIlMccE/MHol0t+lwNfik3 qr1FlOU6Q01gvCzR3u3cBWGD/C/FH/VDG3SJrGVvmnthH3CBVWbI52bxutdFcpnz1Pro HT5ActCLKYixGlVu3ISW3D2WDDOWUSW992QPjWlmgm7ucpUPZQN5RaSHKVl5En3oDs+r pMT1itDxK8gDUre7G5tvsM93h2m4P1vXEojLUNZ2hGQ6cukcBifULdhn/sdjaVeGRx+9 iGqqkk4OaHGQtL3/uoVbGvvER2SmWeYacDZeOqEQEkpIwCPgO+cqBg9lqq9uzn4l23ik 0pkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12396-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m3-20020a170902768300b001d34722c444si11866682pll.584.2023.12.27.18.56.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 18:56:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12396-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12396-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A3AEFB22264 for ; Thu, 28 Dec 2023 02:56:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 338FA23A2; Thu, 28 Dec 2023 02:56:39 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id CA5B110E5; Thu, 28 Dec 2023 02:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id C59576019CDE0; Thu, 28 Dec 2023 10:56:06 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: paul@paul-moore.com, eparis@redhat.com Cc: audit@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?kernel=3A_auditfilter=3A_Remove_unnecessary_?= =?utf-8?q?=E2=80=980=E2=80=99_values_from_ret?= Date: Thu, 28 Dec 2023 10:56:00 +0800 Message-Id: <20231228025600.9796-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786492714416472974 X-GMAIL-MSGID: 1786492714416472974 The ret variable is assigned when it does not need to be defined, as it has already been assigned before use. Signed-off-by: Li zeming --- kernel/auditfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 8317a37dea0bb..be8c680121e46 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -788,7 +788,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) static inline int audit_dupe_lsm_field(struct audit_field *df, struct audit_field *sf) { - int ret = 0; + int ret; char *lsm_str; /* our own copy of lsm_str */