snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 348bf418de5a8013cc27a1127e59951d625d3cca
parent a56faccd57563e9ae3608cb1e4a4e2d5eb578eb8
Author: Santtu Lakkala <santtu.lakkala@unikie.com>
Date:   Tue, 10 Jun 2025 15:35:30 +0300

Fix warning

Diffstat:
Mdata.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data.c b/data.c @@ -300,7 +300,7 @@ xs_val *user_parse_json(snac *user, const char *fn, xs_val *(*deflt)(void)) fstat(fileno(f), &current) == 0 && cached.st_ctime > current.st_ctime) { rv = xs_realloc(NULL, cached.st_size); - if (fread(rv, 1, cached.st_size, bf) == cached.st_size) { + if (fread(rv, cached.st_size, 1, bf) == 1) { fclose(bf); fclose(f); return rv;