From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90A6AC76188 for ; Fri, 19 Jul 2019 11:17:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7049821849 for ; Fri, 19 Jul 2019 11:17:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbfGSLR2 (ORCPT ); Fri, 19 Jul 2019 07:17:28 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:37782 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfGSLR2 (ORCPT ); Fri, 19 Jul 2019 07:17:28 -0400 Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.91) (envelope-from ) id 1hoQtC-0006em-K2; Fri, 19 Jul 2019 13:17:26 +0200 Date: Fri, 19 Jul 2019 13:17:26 +0200 From: Phil Sutter To: Jeremy Sowden Cc: Netfilter Devel , Pablo Neira Ayuso Subject: Re: [PATCH nft v2 1/2] libnftables: got rid of repeated initialization of netlink_ctx variable in loop. Message-ID: <20190719111726.GO1628@orbyte.nwl.cc> Mail-Followup-To: Phil Sutter , Jeremy Sowden , Netfilter Devel , Pablo Neira Ayuso References: <20190719103205.GM1628@orbyte.nwl.cc> <20190719111010.14421-1-jeremy@azazel.net> <20190719111010.14421-2-jeremy@azazel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190719111010.14421-2-jeremy@azazel.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Fri, Jul 19, 2019 at 12:10:09PM +0100, Jeremy Sowden wrote: > Most members in the context doesn't change, so there is no need to > memset it and reassign them on every iteration. Moved that code out of > the loop. > > Fixes: a72315d2bad4 ("src: add rule batching support") > Reported-by: Pablo Neira Ayuso > Signed-off-by: Jeremy Sowden Acked-by: Phil Sutter