The strcmp function is not guaranteed to return -1 or +1
but any negative or positive value if the input strings
are different. Fixed the false assumption which triggered
a build bug on emulated arm64.
t_bstrcmp(void)
{
bt_assert(bstrcmp("aa", "aa") == 0);
- bt_assert(bstrcmp("aa", "bb") == -1);
- bt_assert(bstrcmp("bb", "aa") == 1);
+ bt_assert(bstrcmp("aa", "bb") < 0);
+ bt_assert(bstrcmp("bb", "aa") > 0);
bt_assert(bstrcmp(NULL, NULL) == 0);
bt_assert(bstrcmp(NULL, "bb") == -1);
bt_assert(bstrcmp("bb", NULL) == 1);