[U-Boot] [PATCH v2 02/11] lib: charset: add u16_strncmp()

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Apr 24 18:36:09 UTC 2019


On 4/24/19 8:30 AM, AKASHI Takahiro wrote:
> u16_strncmp() works like u16_strcmp() but only at most n characters
> (in u16) are compared.
> This function will be used in a later patch.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>

The only usage of u16_strncmp() is in patch 3.
u16_strcmp() is not used at all.

In patch 3 'memcmp(var_name16, L"BOOT", 8)' will do the job.

I am not sure if in other cases we wouldn't prefer to compare Unicode
codepoints instead of u16.

So I suggest to skip patches 1 and 2 and use memcmp() in patch 3.

Best regards

Heinrich


More information about the U-Boot mailing list