aboutsummaryrefslogtreecommitdiff
path: root/lib/darr.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-24 18:20:22 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-24 18:20:22 +0100
commit3aad3926d282ccc067eaafed735bddd210fba688 (patch)
treee11dbb3e2889db3722b8ce846387bbda272f5760 /lib/darr.c
parent92855ebb3e42669ccbcbac8bfe13d30b6e6fe894 (diff)
downloadovm-3aad3926d282ccc067eaafed735bddd210fba688.tar.gz
ovm-3aad3926d282ccc067eaafed735bddd210fba688.tar.bz2
ovm-3aad3926d282ccc067eaafed735bddd210fba688.zip
Removed assertion in darr_read_file
If an empty file is read, we want to deal with it in later user code rather than just failing immediately.
Diffstat (limited to 'lib/darr.c')
-rw-r--r--lib/darr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/darr.c b/lib/darr.c
index 4393c4b..9700701 100644
--- a/lib/darr.c
+++ b/lib/darr.c
@@ -71,7 +71,6 @@ darr_t darr_read_file(FILE *fp)
long size = ftell(fp);
darr_init(&darr, size);
fseek(fp, 0, SEEK_SET);
- size_t read = fread(darr.data, size, 1, fp);
- assert(read == 1);
+ fread(darr.data, size, 1, fp);
return darr;
}