[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28315.1294221298@redhat.com>
Date: Wed, 05 Jan 2011 09:54:58 +0000
From: David Howells <dhowells@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: dhowells@...hat.com, Andy Shevchenko <andy.shevchenko@...il.com>,
linux-kernel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, Mimi Zohar <zohar@...ibm.com>,
"Serge E. Hallyn" <serge@...lyn.com>,
James Morris <jmorris@...ei.org>
Subject: Re: [resend][PATCH] fs: use kernel's hex_to_bin() method
Andrew Morton <akpm@...ux-foundation.org> wrote:
> Not a terribly convenient convenience, as most callers will need to cast
> away the constness of the return value. Oh well, those callers should
> have been using a `const char *' anyway.
Maybe. You could always do as strchr():
char *strchr(const char *s, int c);
Then you don't need to cast the result. The problem[*] is that you can't tell
the compiler that the return value should carry the same constness as one of
the arguments because you don't have something like C++ templates.
[*] If indeed not having C++ or templates should be seen as a problem...
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists