spaces after typecasts?

Greg KH greg at kroah.com
Wed Feb 19 13:56:12 EST 2020


On Wed, Feb 19, 2020 at 01:27:45PM +0000, Anuz Pratap Singh Tomar wrote:
> Hi all,
> I don't see anything in coding guidelines about spaces after typecasts i.e.
> (char *)x; vs (char *) x;.
> Typecasts are considered keywords or not? given you could typecast to a non
> C keyword as well?

(char *)x;

checkpatch.pl will catch this for you, try it and see :)

thanks,

greg k-h



More information about the Kernelnewbies mailing list