On Di, 2011-06-21 at 17:59 +0300, Salvatore Iovene wrote:
Hi Patrick,
On Tue, 21 Jun 2011 16:39:40 +0200
Patrick Ohly <patrick.ohly(a)intel.com> wrote:
> > commit 8c55193d34400a2e94089d9fa2e750866c491515
> > Author: Salvatore Iovene <salvatore.iovene(a)linux.intel.com>
> >
> > NeonCXX: don't trust libneon's escape and unescape functions.
>
> Do you have reason to not trust libneon here? We rely on the "Neon
> does not return NULL" semantic in various places. However, I must
> admit that I don't know whether it applies here. NULL might indicate
> something other than out-of-memory here, like "bad input".
I have had unescape return NULL for "%u" more than once. I thought that
if the unescaping (or escaping) should fail, it's better to return the
original string, because, well, it couldn't indeed be (un)escaped.
Makes sense. Adding such information to the commit message or (better)
as source code comments helps reviewers and future readers of the code.
That person might even be you... I certainly rely more on source code
comments than my own memory to remind me why I have written a piece of
code the way I have ;-}
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.