X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_flush.c;h=c2417fb030e593486e6ca5a57f34eb81d45000a3;hb=58bd37c91ae156c746b7b57be68987eacb0d5cb2;hp=de5ccde72b9ae8bb7742e73bf3188f98d83377de;hpb=98535c64952cac84919014d44f9fbe9bf7e1c31d;p=yaffs2.git diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush.c b/direct/timothy_tests/quick_tests/test_yaffs_flush.c index de5ccde..c2417fb 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_flush.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_flush.c @@ -17,15 +17,23 @@ static int handle =-1; int test_yaffs_flush(void) { - int output=0; + int output=-1; handle = test_yaffs_open(); - output =yaffs_flush(handle); - + if (handle >= 0){ + output =yaffs_flush(handle); + } else { + print_message("failed to open file\n",2); + } + return output; } int test_yaffs_flush_clean(void) { - return yaffs_close(handle); + if (handle>=0){ + return yaffs_close(handle); + } else { + return -1; + } }