From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: dhowells@redhat.com, Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, Mimi Zohar <zohar@us.ibm.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
James Morris <jmorris@namei.org>
Subject: Re: [resend][PATCH] fs: use kernel's hex_to_bin() method
Date: Wed, 05 Jan 2011 09:54:58 +0000 [thread overview]
Message-ID: <28315.1294221298@redhat.com> (raw)
In-Reply-To: <20110104152100.29d0da02.akpm@linux-foundation.org>
Andrew Morton <akpm@linux-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
prev parent reply other threads:[~2011-01-05 9:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-10 10:55 [resend][PATCH] fs: use kernel's hex_to_bin() method Andy Shevchenko
2011-01-04 23:21 ` Andrew Morton
2011-01-04 23:58 ` Andy Shevchenko
2011-01-04 23:58 ` Andy Shevchenko
2011-01-05 0:14 ` Andrew Morton
2011-01-05 9:51 ` David Howells
2011-01-05 9:54 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28315.1294221298@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.