Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2795569pxb; Tue, 24 Aug 2021 07:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCJswkuS//tpFpLgecLhRrpE1yCxhQFZ+jCZ1hqlt49apdqJ1hWtJL2Ocy8pD+VS8z/7yB X-Received: by 2002:a05:6638:328d:: with SMTP id f13mr5945742jav.105.1629816532093; Tue, 24 Aug 2021 07:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629816532; cv=none; d=google.com; s=arc-20160816; b=Wx0C7iCcliPoBJMRNHjGb/F67FV6Eoord3Pm4XlpEBMZddLxqwaAQaPctAaLesKl3o Jhuvs2nBqdOLWZSibubMNPEydRNEk6PFk+f+3FfKL7RRNfGXruGHMmmXXGxxjglToir5 7qnhy+DXmlkWPzkr4mejy3z/ey4gwjvl9vrJPyGRa5FVaUrrkzZbGihVOHjum1+wNmwb 5jDryWbSMTD7nA/3y7PZxUG9HnqVXydD9P/PbV5UlkDo8Q71/ygs7BZ7L9L0XvuXRlnb k9sK/PTkxHhWjWQ3zIB7n9EPK5jyCWgOiH+6u6+++TFCdDlrtnQiynh+FipnFMJD59oT nqdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jIny/2XICcZOy9+/It3NCvu/RbXYv1VpP1UfIOelqj8=; b=EWa1KMvVvAkd7I/in7rL92LRhR/3UPjehfogRWlOlP53wDrnGu+UuLcpZK/Pj2jYiA b3VDe68amklh5ZHlADpp1NIfZK9Akov4MgutwkTmm2W92J5VdmrIDs9yqc6ACEzfBFN/ eZzy4iVjzy/gUbQ9BeCSmluTwo9SGJZJYFIyL1s4om2pwW8+JMaQEwsewTtmTjZ7BqzH 9a4lLL9fJi17czy9AZ18KBM1TdBjiuGuqIol23SrejVHTDdfYkiIciyV+pqHwkR5BM5g 1XECfJszTJSLC8P1ADlFYCmPRZpSpl2Pr4nE4k/j5Gyn3wRb+hKMIAWhJgvD+xGMVF6C iSAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=eORvwxyt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si18359856ilq.160.2021.08.24.07.48.39; Tue, 24 Aug 2021 07:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=eORvwxyt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237794AbhHXOr2 (ORCPT + 99 others); Tue, 24 Aug 2021 10:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237755AbhHXOr2 (ORCPT ); Tue, 24 Aug 2021 10:47:28 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9AA2C061764 for ; Tue, 24 Aug 2021 07:46:43 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a25so18205098ejv.6 for ; Tue, 24 Aug 2021 07:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jIny/2XICcZOy9+/It3NCvu/RbXYv1VpP1UfIOelqj8=; b=eORvwxytiEn3npkHgQ7aJgxdcXk4YBzH3LVD52Yk372cD9MczuNNJUEEu22Ye69KGM hBgwAz4e7R1fvDmOGHc2FgPvNz5VcSrWh/OlYYfaCG+TaknZ0LlSB9rUPRISlhkgVy2O +Wl3H32GHR5g5KobNlJJIW9q0x3otVYUbO0PuRyVy4d5ujRHE0mobZ6yJp1UL/NfZMUn K6GiKDTKbgCM/tqna24eOtDMIqubsdRbSunfKpVsAY6PoIzMpEjwSeyIfx5xs+hXptgf KCU5ugL/jLEpjnj/k5LNuUDGZLF0nj6OksHEwhMi7HfhUqKdO5roB2uhy/sf5jV7CAl3 c3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jIny/2XICcZOy9+/It3NCvu/RbXYv1VpP1UfIOelqj8=; b=VVXDnYdZqAcrYAJ/V08ABlVMa0YENGxJZ+eIwCgwcjvfiOeAvQjEMjQ0bOTyrekyCW +TZXQUDf3jx1cRDyJ5eW2PJH9CNYbode/koVq0KFvBjMIsZBo+UXRnzn016TUoTWlb2u ZfTxerz8nc5iJtHhvDWVg2pkQIsFV1kUIgbzqijfjawBdDM8zfkJBLFHcMd67Mboc28B nOLwH9TZ+vHl3T2dWnqy4LMHW8WZZcXANDiw3WoaNzH6EbEZStBZZxo5M7vzRWyWEMe4 eRgmNfK3gSDievfvvZpbk2DKu9cEbmEtHhGnqZSDwtAvAK6cc/YMkbaKFqBTqf40HH1w MGNw== X-Gm-Message-State: AOAM532r39FqWJEDrokn3JG/mCdknhRPsQPlkt3kjJ3hp5ZYYexqdtFU PlLqj21tg3BOws4MFzO3W0YMHPyDGgGSDBrsYUXV X-Received: by 2002:a17:906:2cd6:: with SMTP id r22mr8733409ejr.398.1629816402264; Tue, 24 Aug 2021 07:46:42 -0700 (PDT) MIME-Version: 1.0 References: <20210824022247.GA22908@raspberrypi> In-Reply-To: <20210824022247.GA22908@raspberrypi> From: Paul Moore Date: Tue, 24 Aug 2021 10:46:31 -0400 Message-ID: Subject: Re: [PATCH] selinux: remove duplicated initialization of 'i' for clean-up To: Austin Kim Cc: Stephen Smalley , Eric Paris , selinux@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, austin.kim@lge.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2021 at 10:22 PM Austin Kim wrote: > > From: Austin Kim > > The local variable 'i' is used to be incremented inside while loop > within sidtab_convert_tree(). Before while loop, 'i' is set to 0 > inside if/else statement. > > Since there is no 'goto' statement within sidtab_convert_tree(), > it had better initialize 'i' as 0 once before if/else statement. > > Signed-off-by: Austin Kim > --- > security/selinux/ss/sidtab.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Let's leave the existing code as-is for now. -- paul moore www.paul-moore.com