Re: [PATCH v2] lib/string.c: implement a basic bcmp
From: Steven Rostedt
Date: Wed Mar 13 2019 - 16:12:26 EST
On Wed, 13 Mar 2019 20:34:11 +0100
Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> wrote:
> Yes, but let's completely avoid mentioning memcmp in the summary.
>
> bcmp - return 0 if and only if the buffers have identical contents
> @a: pointer to first buffer
> @b: pointer to second buffer
> @len: size of buffers
>
> The sign or magnitude of a non-zero return value has no particular
> meaning, and architectures may implement their own more efficient
> bcmp(). So while this particular implementation is a simple (tail) call
> to memcmp, do not rely on anything but whether the return value is zero
> or non-zero.
Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Thanks!
-- Steve