X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_write.c;h=cd5a61ffec468a8fd6189f9ae5ec968a23643eb5;hb=4f90d524e3c666c53ae36ad2911e00e5b3741cca;hp=dbd17e592b91421c2a4b9bd7b4d296a55fda6b1e;hpb=24c7a59d54dbe6946be101db3c8ae38f92634129;p=yaffs2.git diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write.c b/direct/timothy_tests/quick_tests/test_yaffs_write.c index dbd17e5..cd5a61f 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_write.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_write.c @@ -27,5 +27,10 @@ int test_yaffs_write(void){ } int test_yaffs_write_clean(void){ - return yaffs_close(handle); + if (handle>=0){ + return yaffs_close(handle); + } + else { + return 1; /* no handle was opened so there is no need to close a handle */ + } }