Hi,

On Saturday 23 October 2004 12:41, Pete Zaitcev wrote:
> > > I really cannot stand this style. Sizeofs taken off data instead of a type
> > > are simply evil and misguided.

On Sat, 23 Oct 2004 13:17:29 -0700, David Brownell <[EMAIL PROTECTED]>
wrote: 
> > Actually I strongly prefer "p = alloc(sizeof *p);" constructs since
> > they don't break when, for example, typeof(p) changes.

On Sat, 2004-10-23 at 22:10 -0700, Pete Zaitcev wrote:
> I know the seeds of evil in you and I strongly disapprove.
> 
>       struct foo {  char *ptr  } *boo;
> 
>       boo = kmalloc(sizeof(*boo), GFP_KERNEL);

Sorry but what's the problem with the above? I chose the "p =
alloc(sizeof *p);" construct because:

  - It seems to be the most dominant style in the kernel
  - It makes the lines shorter and more readable
  - When you change the variable type at declaration, you don't need to
    change the kmalloc calls (usually)

I can change them back for the cleanup patch but could you please agree
on the policy first.

                Pekka



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to