lkml.org 
[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] trivial: amba-clcd.c preferred form of passing size of structure
On Wed, May 18, 2011 at 11:37:06PM +0530, anish wrote:
> The preferred form for passing a size of a struct is the following:
> p = kmalloc(sizeof(*p), ...);
> Please refer Documentation/Codingstyle chapter 14
>
> Signed-off-by: anish kumar <anish198519851985@gmail.com>
>
That's pretty subjective, and ultimately depends on the author. I
personally prefer to have it written out, but then I don't randomly
change my structure types around either, so the "bug" alluded to isn't
really an issue. I'm not sure I buy the impaired readability argument,
either..


\
 
 \ /
  Last update: 2011-05-23 09:15    [W:0.763 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site