yaffs Found and fixed the bugs in quick tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_ftruncate.c
index fec910d346d7bef5e72f1d961f2468f2215cedeb..a6d661bcb04b66638ac542926369b55faaaec902 100644 (file)
@@ -16,7 +16,7 @@
 static int handle=0;
 int test_yaffs_ftruncate(void){
        handle=test_yaffs_open();
-       if (handle>0){
+       if (handle>=0){
                return yaffs_ftruncate(handle,FILE_SIZE_TRUNCATED );
        }
        else {
@@ -28,7 +28,7 @@ int test_yaffs_ftruncate(void){
 int test_yaffs_ftruncate_clean(void){
        /* change file size back to orignal size */
        int output=0;
-       if (handle>0){
+       if (handle>=0){
                output=yaffs_ftruncate(handle,FILE_SIZE );
                if (output>=0){
                        return yaffs_close(handle);