Re: [PATCH 2/7] [CCID-2]: Remove ccid2hc{tx,rx}_ prefixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gerrit Renker <gerrit@xxxxxxxxxxxxxx>
Date: Tue, 27 May 2008 09:32:42 +0100

> This patch fixes two problems caused by the ubiquitous long "hctx->ccid2htx_"
> and "hcrx->ccid2hcrx_" prefixes:
>  * code becomes hard to read;
>  * multiple-line statements are almost inevitable even for simple expressions;
> The prefixes are not really necessary (compare with "struct tcp_sock").
> 
> There had been previous discussion of this on dccp@vger, but so far this was
> not followed up (most people agreed that the prefixes are too long).
> 
> Signed-off-by: Gerrit Renker <gerrit@xxxxxxxxxxxxxx>
> Signed-off-by: Leandro Melo de Sales <leandroal@xxxxxxxxx>

You're the dccp maintainer, but...

The whole reason we use these member prefixes is so that the
tree is actually greppable.  tcp_sock is the way it is because
we never enforced this useful policy back when it was originally
created.

If you use short member names, it becomes eventually impossible
to grep for "->foo" and have it not match a ton of crap you
are completely not interested in.  Using a prefix creates a
struct member namespace, and thus fixes that problem.

Use editor macros if you don't want to type so much :-)

--
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux