[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Nov 2010 19:48:47 +0000
From: David Howells <dhowells@...hat.com>
To: Mimi Zohar <zohar@...ux.vnet.ibm.com>
Cc: dhowells@...hat.com, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...ux-nfs.org,
linux-crypto@...r.kernel.org,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
James Morris <jmorris@...ei.org>,
David Safford <safford@...son.ibm.com>,
Rajiv Andrade <srajiv@...ux.vnet.ibm.com>,
Mimi Zohar <zohar@...ibm.com>
Subject: Re: [PATCH v1.3 1/4] lib: hex2bin converts ascii hexadecimal string to binary
Mimi Zohar <zohar@...ux.vnet.ibm.com> wrote:
> +void hex2bin(unsigned char *mem, char *buf, int count)
I think this needs a little adjustment. I would recommend something like the
following declaration:
void hex2bin(u8 *buf, const char *data, size_t count)
since the output data is binary (so use u8*), you're only reading the source
data (so should use a const pointer) and you don't want to see a negative
count (so use size_t).
Also, I'd suggest calling the source arg 'data' and the output arg 'buf' or
maybe src/dst.
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