From patchwork Fri Jul 28 15:54:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 127744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp560107vqg; Fri, 28 Jul 2023 09:44:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMcqGptistp1lMbv3fVRqYE/DwNewE1wOx1AzjsmbxxTnX2JrfvLSCcsYQcLfUlx6TN3zW X-Received: by 2002:a17:902:c950:b0:1bb:833c:6ba8 with SMTP id i16-20020a170902c95000b001bb833c6ba8mr1938622pla.56.1690562664122; Fri, 28 Jul 2023 09:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690562664; cv=none; d=google.com; s=arc-20160816; b=vcg56z2yd12DCPDPkE96bi7HyNfU/28TdsNSYXc2uAioRj0ynBeYCQpVA9dNmXhIIn QtuUQ90mXPtNak+ZyVk91JGI2lDpqBOKEm42Sgxi9k0xXla9hNawpK9yhk/ZEAEnACS9 tiLnAdozQcN61aFGgL9VucjVByQk7Wg2Lx8QPFw1nGwa/gpnDCgKaIv6ZcyWAfVY9Goa JSM2dKFFd75rxKv+5TQ2uh2ioCpNJL8boeMmKBKDQ0tAR+D27BOFt4s0RY//ghTyTG/P YC6yJJYERx8Y09COjbSMC6PbLfJTtyAL/GIz87TJf0Ldqu0gvZbZUXG6CFCIFZMutzVA sPgA== 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=1+ccw4NZa5atLMu3PvWU3CwI2TXUxTCi4zdltIKSN3g=; fh=QKur2PFwoLuCt27JzfZM4LabS9ldoGoSAJNPH9t/KWI=; b=uusNSSNdJT3ZjIdM8vqy6AXT9byDWa3Gvl2oPPSAeQP/KYSX9Md8gQFgdmUDr9V1ox 5rttnUmhHkBg3a0hLqZEASCjjzsz7d623QU/lhbkvI6TyYE5IdMI+DsENnAmjd5pLcgm 3tff5yp9XjpmFYTg/RKJ73MsLbiANWJAgK+MdDUBxAZGceTq5mUUqgTyzYbco/3rHJnG y6akVOGMwLgyQOsSZrpnT5MUB4wVlXie+fB3zSDE/xa9Uw+yPcuK8v5pQycsfAduZplc 00+XGqFPwStgr97SBaLLk1DQtmUJVLkJLcJfjyVONjlaHH492ChZThuF3Il1AZ6qK/4R ErfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20221208 header.b=ARajOChS; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a1709028d8e00b001b9736814b6si3132016plo.309.2023.07.28.09.44.10; Fri, 28 Jul 2023 09:44:24 -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=pass header.i=@googlemail.com header.s=20221208 header.b=ARajOChS; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236467AbjG1Pzi (ORCPT + 99 others); Fri, 28 Jul 2023 11:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236705AbjG1Pz2 (ORCPT ); Fri, 28 Jul 2023 11:55:28 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD10449F; Fri, 28 Jul 2023 08:55:13 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-99bc512526cso327468366b.1; Fri, 28 Jul 2023 08:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1690559711; x=1691164511; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1+ccw4NZa5atLMu3PvWU3CwI2TXUxTCi4zdltIKSN3g=; b=ARajOChSPVav64iGhopmQ+8nKBr9w1b6PNunqIbKhFQmYug3HbMmKML7tFUcKNDAql 8wkzm7ISP2STHyjKgjKxt9qn0FEp1DO0S26sPjEhKfRbGY95eUuu8BVgGsX2ULoWOK5J LStkmwMuYdYXxRLiL6V0ilniPW8osDGql14vP84IP2odVzePfjACtH8OnVOcnAgCTRYy eUf1j2xi2erzVvWxtUoSBCeLvcEbeX1pPFJ/MzjeY5GzjZCVWrZQZnNWvDt0S1Gk9dEm q/aIXYE1FmdAlsl30NQyYVNqB4ZBaDPWUhKdw2ccwO1yHDvDXAGiXfWD2jXiiWP4sLpr Q5yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690559711; x=1691164511; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1+ccw4NZa5atLMu3PvWU3CwI2TXUxTCi4zdltIKSN3g=; b=ZcLlnpaz+ELCp5vK/IfZ7qXEFz5Ew5UbUTGXjoCtyLHPSPTlskKkRNaNIdj8neE6M5 zxUr8+xV4gcxNlt+/DWPj+yb5AFWRRx25ZFELDRNaznoGnwPRjlZlwbjgkTPcEt2vzGJ 1CreEv7xKr7zI+5Grx/3dGDJKTf22pmJB0owf8RgQwULmbfc1oeW29S3JwTVMld+GBsJ kmOC9yNz4899INr/MjOtaFX7XTrQlw+5qjuXC1QKpZcuQf8kbbBUl746bAeRpDoHF6Wu ay+B4ff8tIoq6UhQPVFvmIl77CJZPTOw552uSMbD77A0sr0OcfGxq9BEtXqsKfrjQ8ZX xRhQ== X-Gm-Message-State: ABy/qLarP9Lp3+0ElYJGlXdisBGlY24Ys6KTjgmPrLimAudeOwD9Sphz kPT0bnGpthRPhB4+z0J6zf2u8wa/qUHVZS4i X-Received: by 2002:a17:906:155:b0:99b:4ed4:5527 with SMTP id 21-20020a170906015500b0099b4ed45527mr2618066ejh.25.1690559711163; Fri, 28 Jul 2023 08:55:11 -0700 (PDT) Received: from debian_development.DebianHome (dynamic-077-000-157-016.77.0.pool.telefonica.de. [77.0.157.16]) by smtp.gmail.com with ESMTPSA id f5-20020a1709064dc500b0098669cc16b2sm2198345ejw.83.2023.07.28.08.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 08:55:10 -0700 (PDT) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Cc: Paul Moore , Stephen Smalley , Eric Paris , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/9] selinux: use identical iterator type in hashtab_duplicate() Date: Fri, 28 Jul 2023 17:54:53 +0200 Message-Id: <20230728155501.39632-2-cgzones@googlemail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230728155501.39632-1-cgzones@googlemail.com> References: <20230728155501.39632-1-cgzones@googlemail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772683435916497838 X-GMAIL-MSGID: 1772683435916497838 Use the identical type u32 for the loop iterator. Signed-off-by: Christian Göttsche --- v2: avoid declarations in init-clauses of for loops --- security/selinux/ss/hashtab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c index 30532ec319ce..7df9640554be 100644 --- a/security/selinux/ss/hashtab.c +++ b/security/selinux/ss/hashtab.c @@ -137,7 +137,8 @@ int hashtab_duplicate(struct hashtab *new, struct hashtab *orig, void *args) { struct hashtab_node *cur, *tmp, *tail; - int i, rc; + u32 i; + int rc; memset(new, 0, sizeof(*new));