tests/lib/strutil/filevercmp.c: use _GL_CMP() to get sign.

tests/lib/strutil/str_verscmp.c: likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2022-02-20 17:54:09 +03:00
parent 39e7a048f7
commit d00a1c22b9
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "tests/mctest.h"
#include "lib/strutil.h"
#include "lib/util.h" /* _GL_CMP() */
/* --------------------------------------------------------------------------------------------- */
@ -50,7 +51,7 @@ teardown (void)
static int
sign (int n)
{
return ((n < 0) ? -1 : (n == 0) ? 0 : 1);
return _GL_CMP (n, 0);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -29,6 +29,7 @@
#include "tests/mctest.h"
#include "lib/strutil.h"
#include "lib/util.h" /* _GL_CMP() */
/* --------------------------------------------------------------------------------------------- */
@ -58,7 +59,7 @@ teardown (void)
static int
sign (int n)
{
return ((n < 0) ? -1 : (n == 0) ? 0 : 1);
return _GL_CMP (n, 0);
}
/* --------------------------------------------------------------------------------------------- */