xen/lib: Fix strcmp() and strncmp()
authorJane Malalane <jane.malalane@citrix.com>
Tue, 27 Jul 2021 18:47:15 +0000 (19:47 +0100)
committerIan Jackson <iwj@xenproject.org>
Fri, 30 Jul 2021 09:52:46 +0000 (10:52 +0100)
commit3747a2bb67daa5a8baeff6cda57dc98a5ef79c3e
tree74623eb1302fb0801fa53c380e8539f893f6d1bd
parent58ad654ebce7ccb272a3f4f3482c03aaad850d31
xen/lib: Fix strcmp() and strncmp()

The C standard requires that each character be compared as unsigned
char. Xen's current behaviour compares as signed char, which changes
the answer when chars with a value greater than 0x7f are used.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jane Malalane <jane.malalane@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
xen/lib/strcmp.c
xen/lib/strncmp.c