lkml.org 
[lkml]   [2001]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] struct char_device
On Tue, May 22, 2001 at 11:08:16AM -0500, Oliver Xymoron wrote:

> > >+ struct list_head hash;

> > Why not name consistently with the struct block_device?
> > struct list_head cd_hash;

> Because foo_ is a throwback to the days when C compilers had a single
> namespace for all structure elements, not a readability aid. If you need
> foo_ to know what type of structure you're futzing with, you need to name
> your variables better.

One often has to go through all occurrences of a variable or
field of a struct. That is much easier with cd_hash and cd_dev
than with hash and dev.

No, it is a good habit, these prefixes, even though it is no longer
necessary because of the C compiler.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.040 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site