* grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as
per common usage and preffered in several parts of code. (grub_memcmp): Likewise. (grub_strncmp): Likewise. * include/grub/misc.h (grub_strcasecmp): Likewise. (grub_strncasecmp): Likewise. * Makefile.util.def (cmp_test): New test. (grub_script_strcmp): Likewise. * tests/cmp_unit_test.c: New file. * tests/grub_script_strcmp.in: Likewise. * grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Add a comment.
This commit is contained in:
parent
49717bf429
commit
ce41ab7aab
7 changed files with 293 additions and 7 deletions
22
tests/grub_script_strcmp.in
Normal file
22
tests/grub_script_strcmp.in
Normal file
|
@ -0,0 +1,22 @@
|
|||
#! @builddir@/grub-shell-tester
|
||||
#
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
if [ "z" "<" "â" ]; then echo unsigned; else echo signed; fi
|
||||
if [ "z" ">" "â" ]; then echo signed; else echo unsigned; fi
|
Loading…
Add table
Add a link
Reference in a new issue