From 3aad3926d282ccc067eaafed735bddd210fba688 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 24 Oct 2023 18:20:22 +0100 Subject: 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. --- lib/darr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/darr.c') 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; } -- cgit v1.2.3-13-gbd6f