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: <a1bd95b5-ea93-0e99-7784-dad393240f06@hartkopp.net>
Date:	Thu, 23 Jun 2016 18:45:58 +0200
From:	Oliver Hartkopp <socketcan@...tkopp.net>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Marc Kleine-Budde <mkl@...gutronix.de>, netdev@...r.kernel.org
Cc:	davem@...emloft.net, linux-can@...r.kernel.org,
	kernel@...gutronix.de, stable@...r.kernel.org
Subject: Re: [PATCH 2/3] can: fix oops caused by wrong rtnl dellink usage

On 06/23/2016 03:09 PM, Sergei Shtylyov wrote:

>>>> +static void can_dellink(struct net_device *dev, struct list_head
>>>> *head)
>>>> +{
>>>> +    return;
>>>
>>>    Why?
>>>
>>
>> http://marc.info/?l=linux-can&m=146651600421205&w=2
>>
>> The same reason as for commit 993e6f2fd.
>
>    I was asking just about the useless *return* statement...
>

Ah!

I did some investigation before whether using 'return' in empty void 
functions or not.

static void can_dellink(struct net_device *dev, struct list_head *head);

and

static void can_dellink(struct net_device *dev, struct list_head *head)
{
	return;
}

do the same job, right?

But the first one looks like a forward declaration and you would try to 
find the 'implementing' function then.

Of course you can write less code and both implementations are correct - 
but this representation makes it pretty clear that here's nothing to do :-)

Regards,
Oliver


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ