Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1896352rwb; Fri, 2 Dec 2022 02:40:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf6IQs64jUrQTDWgavdlgbV9tDzhe4sBUCOWMuZ4K7oOZCZbLSnUz5ON5KutnaLYdjjaRgmD X-Received: by 2002:a17:906:a148:b0:7ad:b286:8ee2 with SMTP id bu8-20020a170906a14800b007adb2868ee2mr16839811ejb.511.1669977622052; Fri, 02 Dec 2022 02:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669977622; cv=none; d=google.com; s=arc-20160816; b=xU7isXq5cUrHklKDrMqlbqJe1pvO54C165ab3oZmJIOwV943SaQ+lcGjwPyZOGss22 GyWkd5ZmmrVroKmyTi9n3aBe7KwvaZtO1/if64W4sIm5mwXTjgOizKxGO+8JvJK9riOP iyz7emFh6FVA5EqXEa1+1aqXzLn/m3dPGx/mzUgfo8+DcqYgYxGFB4niGDWRn8v0Ihh7 ceOR3MVr35lxcsIM4fo09n2DHJKAzt+xw/W7Z3a5TQyMJ7SN6QqLYkOvfEsEI+9CbuDu G4SZiN2cHn+H69R0+pl3R8KtIJFXUxIKzCRmALdvwXlPgwLgyQXnwqB0QmBBRpJ/7O7I bnSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=9Qh0FwX/kyuCRPA8u8UZJ+Id3yMITQo2eVTHLoYpqHQ=; b=eAXv27LJmIcAD/F7mj6Ho62dG+exahu8aeEI2NM9P3s5FDxEvqylBGvjmKceDbqkS6 mpwTmb8SVDH6mRoXM505u1HbgGsTVDMUsGCBGEwYlLB3T/sSyoFUamP+qTf9AYRwkO2T 58vEX/KQbexzl4RVLokSLyV/lHfZP+34amFVSOM1GW0yW/P6izcc+Bk3ftb1pRvUPAOZ L4ir6OX6uzlH+mu2Bo4IKvVTxWsxt0SHdKkB+bfSKs9+m3gaMeK5GrBemLKbCUs8Id06 aTZoEDRB80rfe+rbPplplBEIhUxpPm+L63GsYbtr9zZoI1lJjpk0GV/jBxibYACxWouq X46g== ARC-Authentication-Results: i=1; mx.google.com; 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 v2-20020a056402348200b0046ba66c738bsi6274807edc.620.2022.12.02.02.40.00; Fri, 02 Dec 2022 02:40:22 -0800 (PST) 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; 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 S232880AbiLBJS4 (ORCPT + 82 others); Fri, 2 Dec 2022 04:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiLBJSv (ORCPT ); Fri, 2 Dec 2022 04:18:51 -0500 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B3ECA47E1; Fri, 2 Dec 2022 01:18:47 -0800 (PST) Received: by a3.inai.de (Postfix, from userid 25121) id C1323586FABC1; Fri, 2 Dec 2022 10:18:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id C06EC60D33E5A; Fri, 2 Dec 2022 10:18:44 +0100 (CET) Date: Fri, 2 Dec 2022 10:18:44 +0100 (CET) From: Jan Engelhardt To: Al Viro cc: Li Qiong , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, kernel-janitors@vger.kernel.org, coreteam@netfilter.org, Yu Zhe Subject: Re: [PATCH] netfilter: initialize 'ret' variable In-Reply-To: Message-ID: <3p77q27-8495-sss2-3r38-r1448nqsoop@vanv.qr> References: <20221202070331.10865-1-liqiong@nfschina.com> User-Agent: Alpine 2.25 (LSU 592 2021-09-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 On Friday 2022-12-02 08:13, Al Viro wrote: >On Fri, Dec 02, 2022 at 03:03:31PM +0800, Li Qiong wrote: >> The 'ret' should need to be initialized to 0, in case >> return a uninitialized value. > >Why is 0 the right value? And which case would it be? >We clearly need to know that to figure out which return >value would be correct for it... Judging from the error-handling branches, it should be ret = NF_ACCEPT.