Messages in this thread | | | Date | Tue, 16 Nov 2004 13:20:38 +0200 | From | Pekka Enberg <> | Subject | Re: [PATCH] [Request for inclusion] Filesystem in Userspace |
| |
Hi,
On Tue, 16 Nov 2004 12:01:06 +0100, Simon Braunschmidt <braunschmidt@corscience.de> wrote: > And redundancy does hurt maintainability. > > Naturally, it would be the other way around. > Sure you can write all your code in binary, or even better compressed, > but i wouldnt maintain those beasts ;-)
No, that is obfuscation and has nothing to do with this. The cast I mentioned is _redudant_ because the common case is:
struct foo * f = (struct foo *) priv; /* priv is void pointer */
And the cast gives you absolutely zero benefit in terms of readability. For arithmetic types, you use casts to be explicit about different conversions, but for void pointers there's only one conversion which makes sense and that's what the standard guarantees.
On Tue, 16 Nov 2004 12:01:06 +0100, Simon Braunschmidt <braunschmidt@corscience.de> wrote: > I vote for explicit casts, makes code more readable.
I vote for the established kernel coding style.
Pekka - 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/
| |