* grub-core/fs/bfs.c (bfs_strcmp) [MODE_AFS]: Use signed comparison.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-05-04 10:52:26 +02:00
parent 1796965f6c
commit 0a308f64e9
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-05-04 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/bfs.c (bfs_strcmp) [MODE_AFS]: Use signed comparison.
2012-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/getroot.c (find_hurd_root_device): Try to make error message

View file

@ -519,10 +519,17 @@ bfs_strcmp (const char *a, const char *b, grub_size_t alen)
alen--;
}
#ifdef MODE_AFS
if (!alen)
return - (int) (grub_uint8_t) *b;
return - (int) (grub_int8_t) *b;
return (int) (grub_int8_t) *a - (int) (grub_int8_t) *b;
#else
if (!alen)
return - (int) (grub_uint8_t) *b;
return (int) (grub_uint8_t) *a - (int) (grub_uint8_t) *b;
#endif
}
static grub_err_t