projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched to tmpfile() where appropriate.
[fw/pdclib]
/
functions
/
stdio
/
clearerr.c
diff --git
a/functions/stdio/clearerr.c
b/functions/stdio/clearerr.c
index 810e62d7606d99f79613df9faa97ec520f13819d..af25029032f1fc4d79ec89654bb4bd690a81592e 100644
(file)
--- a/
functions/stdio/clearerr.c
+++ b/
functions/stdio/clearerr.c
@@
-23,8
+23,7
@@
void clearerr( struct _PDCLIB_file_t * stream )
int main( void )
{
FILE * fh;
int main( void )
{
FILE * fh;
- remove( "testing/testfile" );
- TESTCASE( ( fh = fopen( "testing/testfile", "w+" ) ) != NULL );
+ TESTCASE( ( fh = tmpfile() ) != NULL );
/* Flags should be clear */
TESTCASE( ! ferror( fh ) );
TESTCASE( ! feof( fh ) );
/* Flags should be clear */
TESTCASE( ! ferror( fh ) );
TESTCASE( ! feof( fh ) );
@@
-46,7
+45,6
@@
int main( void )
TESTCASE( ! ferror( fh ) );
TESTCASE( ! feof( fh ) );
TESTCASE( fclose( fh ) == 0 );
TESTCASE( ! ferror( fh ) );
TESTCASE( ! feof( fh ) );
TESTCASE( fclose( fh ) == 0 );
- remove( "testing/testfile" );
return TEST_RESULTS;
}
return TEST_RESULTS;
}