mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 14:07:39 +00:00
Windows: comparisons of nul strings should match
When comparing nul strings in cm_strnicmp_utf8 and cm_strnicmp_utf16 the functions should return 0. LICENSE MIT Change-Id: I30c1321f42135a5e0160407467549b13cc92393f Reviewed-on: http://gerrit.openafs.org/2539 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
3daf18a3cb
commit
03f76092bd
@ -1113,6 +1113,9 @@ int cm_strnicmp_utf8(const char * str1, const char * str2, int n)
|
|||||||
if (!nls_init)
|
if (!nls_init)
|
||||||
cm_InitNormalization();
|
cm_InitNormalization();
|
||||||
|
|
||||||
|
if (n == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* first check for NULL pointers (assume NULL < "") */
|
/* first check for NULL pointers (assume NULL < "") */
|
||||||
if (str1 == NULL) {
|
if (str1 == NULL) {
|
||||||
if (str2 == NULL)
|
if (str2 == NULL)
|
||||||
@ -1159,6 +1162,9 @@ int cm_strnicmp_utf16(const cm_unichar_t * str1, const cm_unichar_t * str2, int
|
|||||||
if (!nls_init)
|
if (!nls_init)
|
||||||
cm_InitNormalization();
|
cm_InitNormalization();
|
||||||
|
|
||||||
|
if (len == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* first check for NULL pointers */
|
/* first check for NULL pointers */
|
||||||
if (str1 == NULL) {
|
if (str1 == NULL) {
|
||||||
if (str2 == NULL)
|
if (str2 == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user