aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_akfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/test_akfs.c b/src/tests/test_akfs.c
index e95508b..c1eddbc 100644
--- a/src/tests/test_akfs.c
+++ b/src/tests/test_akfs.c
@@ -152,12 +152,18 @@ void hash_save_to_file()
if ( fd == NULL )
{
printf("Some error occured");
+ exit(1);
}
fwrite(&resulted_hash, sizeof(sha512sum),1,fd);
fclose(fd);
sha512sum readone = {0};
fd = fopen("tmpfile", "rb");
+ if ( fd == NULL )
+ {
+ printf("Some error occured");
+ exit(1);
+ }
fread (&readone, sizeof(sha512sum),1,fd);
char* resulted_string = ak_fs_sha512sum_struct_to_string(readone);