From 4fa9051e2e7b88116c5557321a119e1072227487 Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Wed, 22 Aug 2012 14:20:55 +0100 Subject: [PATCH] rename: test driver checked for rv == -1 on failure. Standard defines failure as any non-zero return; now check rv != 0. This makes the testsuite complete on win32 without failures (excepting disabled/not yet tested warnings) --- functions/stdio/rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/stdio/rename.c b/functions/stdio/rename.c index 6b1e1b5..987b78a 100644 --- a/functions/stdio/rename.c +++ b/functions/stdio/rename.c @@ -46,7 +46,7 @@ int main( void ) TESTCASE( fopen( testfile1, "r" ) == NULL ); TESTCASE( fopen( testfile2, "r" ) == NULL ); /* rename file 1 to file 2 - expected to fail */ - TESTCASE( rename( testfile1, testfile2 ) == -1 ); + TESTCASE( rename( testfile1, testfile2 ) != 0 ); /* create file 1 */ TESTCASE( ( file = fopen( testfile1, "w" ) ) != NULL ); TESTCASE( fputs( "x", file ) != EOF ); @@ -71,7 +71,7 @@ int main( void ) _PDCLIB_rename() itself. */ /* NOREG as glibc overwrites existing destination file. */ - TESTCASE_NOREG( rename( testfile1, testfile2 ) == -1 ); + TESTCASE_NOREG( rename( testfile1, testfile2 ) != 0 ); /* remove both files */ TESTCASE( remove( testfile1 ) == 0 ); TESTCASE( remove( testfile2 ) == 0 ); -- 2.40.0