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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Nov 2019 08:24:31 +0000
From:   Roi Dayan <roid@...lanox.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        David Ahern <dsahern@...il.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Eli Britstein <elibr@...lanox.com>
Subject: Re: [PATCH iproute2 1/5] tc_util: introduce a function to print
 JSON/non-JSON masked numbers



On 2019-11-13 7:18 PM, Stephen Hemminger wrote:
> On Wed, 13 Nov 2019 12:12:41 +0200
> Roi Dayan <roid@...lanox.com> wrote:
> 
>> +static void print_masked_type(__u32 type_max,
>> +			      __u32 (*rta_getattr_type)(const struct rtattr *),
>> +			      const char *name, struct rtattr *attr,
>> +			      struct rtattr *mask_attr)
>> +{
>> +	SPRINT_BUF(namefrm);
>> +	__u32 value, mask;
>> +	SPRINT_BUF(out);
>> +	size_t done;
>> +
>> +	if (attr) {
> 
> code is cleaner if you use short circuit return here. i.e
> 
> 	if (!attr)
> 		return;
> 
> ...
> 

right. thanks for the comments. we'll fix it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ