summaryrefslogtreecommitdiffstats
path: root/ini/ini_valueobj_ut.c
diff options
context:
space:
mode:
Diffstat (limited to 'ini/ini_valueobj_ut.c')
-rw-r--r--ini/ini_valueobj_ut.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ini/ini_valueobj_ut.c b/ini/ini_valueobj_ut.c
index 767a64c..cb261fe 100644
--- a/ini/ini_valueobj_ut.c
+++ b/ini/ini_valueobj_ut.c
@@ -233,7 +233,7 @@ int other_create_test(FILE *ff, struct value_obj **vo)
if (strncmp(fullstr, expected, strlen(expected) + 1) != 0) {
printf("The expected value is different.\n%s\n", fullstr);
value_destroy(new_vo);
- return error;
+ return EINVAL;
}
/* Get value's origin */
@@ -247,7 +247,7 @@ int other_create_test(FILE *ff, struct value_obj **vo)
if (origin != INI_VALUE_READ) {
printf("The expected origin is different.\n%d\n", origin);
value_destroy(new_vo);
- return error;
+ return EINVAL;
}
/* Get value's line */
@@ -261,7 +261,7 @@ int other_create_test(FILE *ff, struct value_obj **vo)
if (line != 1) {
printf("The expected line is different.\n%d\n", origin);
value_destroy(new_vo);
- return error;
+ return EINVAL;
}
/* Get comment from the value */
@@ -300,7 +300,7 @@ int other_create_test(FILE *ff, struct value_obj **vo)
/* But this should not happen anyways -
* it will be coding error.
*/
- return error;
+ return EINVAL;
}
/* Put comment back */
@@ -428,6 +428,8 @@ int vo_basic_test(void)
value_destroy(vo);
}
+ vo = NULL;
+
/* Run other create test here */
error = other_create_test(ff, &vo);
if (error) {