projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Yet more tests for quick tests.
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
test_yaffs_read.c
diff --git
a/direct/timothy_tests/quick_tests/test_yaffs_read.c
b/direct/timothy_tests/quick_tests/test_yaffs_read.c
index 2bc2aba6c964eed2ea0ac0a042e32917c0045618..a5157d24f7d4064c603dea33fc023e3de18cfdfc 100644
(file)
--- a/
direct/timothy_tests/quick_tests/test_yaffs_read.c
+++ b/
direct/timothy_tests/quick_tests/test_yaffs_read.c
@@
-13,7
+13,7
@@
#include "test_yaffs_read.h"
#include "test_yaffs_read.h"
-static int handle=
0
;
+static int handle=
-1
;
int test_yaffs_read(void){
handle=test_yaffs_open();
int test_yaffs_read(void){
handle=test_yaffs_open();
@@
-46,5
+46,10
@@
int test_yaffs_read(void){
}
int test_yaffs_read_clean(void){
}
int test_yaffs_read_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 */
+ }
}
}