From: Maria Matejka Date: Sat, 11 May 2024 14:36:49 +0000 (+0200) Subject: lib/printf_test.c: test on strcmp fixed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3daf69cd114dd10560d862755b8e0daf6384d93;p=thirdparty%2Fbird.git lib/printf_test.c: test on strcmp fixed we mistakenly required the return value to be only -1, 0 or 1 --- diff --git a/lib/printf_test.c b/lib/printf_test.c index 88ecf05e2..3b26ec171 100644 --- a/lib/printf_test.c +++ b/lib/printf_test.c @@ -108,11 +108,11 @@ static int 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); + bt_assert(bstrcmp(NULL, "bb") < 0); + bt_assert(bstrcmp("bb", NULL) > 0); return 1; }