lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250508095439.26c63ff3@kernel.org>
Date: Thu, 8 May 2025 09:54:39 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
 jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 1/3] tools: ynl-gen: support sub-type for
 binary attributes

On Thu, 8 May 2025 12:33:10 +0100 Donald Hunter wrote:
> >  class TypeBinary(Type):
> >      def arg_member(self, ri):
> > +        if self.get('sub-type') and self.get('sub-type') in scalars:  
> 
> This check is repeated a lot, so maybe it would benefit from a
> _has_scalar_sub_type() helper?

I've gotten used to repeating the conditions in TypeArrayNest 
and TypeMultiAttr...

Looking at it now, since I'm using .get() the part of the condition 
is unnecessary. How about just:

	if self.get('sub-type') in scalars:

? None is not a scalar after all

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ