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:	Tue, 12 Aug 2008 17:29:02 +0200
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Andy Whitcroft <apw@...dowen.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Joel Schopp <jschopp@...tin.ibm.com>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Possible false positive in checkpatch

Alan Stern <stern@...land.harvard.edu> writes:

> ERROR: space prohibited after that '*' (ctx:BxW)


> Certainly this is a rather uncommon code construction, but similar
> ones might occur elsewhere.  To my eyes,
>
> 	(* (type *) ptr)
>
> looks better than
>
> 	(*(type *) ptr)
>
> or
>
> 	(*(type *)ptr)
>
> or even
>
> 	(*(type*)ptr)
>
> but of course this is a matter of opinion.  Is there any strong feeling 
> about this in the kernel community?

I think checkpatch already has gone way too far with this (and not
only this).

"type *var" vs "type* var" - sure, the latter is worse and provokes
"type* var1, var2", but anything else is IMHO only annoying and,
actually, not important WRT readability at all.

For example I prefer "type* func()" - as it's a function returning
"a pointer to type" and not "a pointer to a function returning type"
(which "type *func()" may suggest). Yes, func is not a pointer, so why
write "*" next to it?
-- 
Krzysztof Halasa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ