From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Thu, 25 Apr 2019 09:16:17 +0900 Subject: [U-Boot] [PATCH v2 02/11] lib: charset: add u16_strncmp() In-Reply-To: References: <20190424063045.14443-1-takahiro.akashi@linaro.org> <20190424063045.14443-3-takahiro.akashi@linaro.org> Message-ID: <20190425001615.GC7158@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Apr 24, 2019 at 08:36:09PM +0200, Heinrich Schuchardt wrote: > 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 > > The only usage of u16_strncmp() is in patch 3. > u16_strcmp() is not used at all. The fact is that u16_strcmp() is already used in my 'secure boot' patch and then I moved on to non-volatile patch. > 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. That is my concern, too :) > So I suggest to skip patches 1 and 2 and use memcmp() in patch 3. Okay, patch#1 will be planned to be included in 'secure boot' patch. -Takahiro Akashi > Best regards > > Heinrich