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]
Date:	Thu, 13 May 2010 11:37:40 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] drivers/net: Remove unnecessary returns from 
	void function()s

On Thu, May 13, 2010 at 9:58 AM, Joe Perches <joe@...ches.com> wrote:
> On Tue, 2010-05-11 at 12:30 -0700, Joe Perches wrote:
>> diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
>> index 2aa3367..02497bc 100644
>> --- a/drivers/net/bonding/bonding.h
>> +++ b/drivers/net/bonding/bonding.h
>> @@ -368,15 +368,12 @@ void bond_unregister_ipv6_notifier(void);
>>  #else
>>  static inline void bond_send_unsolicited_na(struct bonding *bond)
>>  {
>> -     return;
>>  }
>>  static inline void bond_register_ipv6_notifier(void)
>>  {
>> -     return;
>>  }
>>  static inline void bond_unregister_ipv6_notifier(void)
>>  {
>> -     return;
>>  }
>>  #endif
>
> fyi: Patrick McHardy prefers null statement void functions to
> keep the return.
>
> There are some more removals of return like this in the patch.
> If a new patch should be generated, do tell.
>

If you're looking to save a few more lines, many places do the following:

static inline void bond_unregister_ipv6_notifier(void) {}

Cheers,

Harvey
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ