fs_backing_store: Fix some comparison types

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-02-24 17:43:14 +00:00
parent fa75e8e4fd
commit 02c5bde5a9
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -667,7 +667,7 @@ write_entry(struct store_entry *ent, int fd)
uint32_t len = strlen(nsurl_access(ent->url));
if (write(fd, &len, sizeof(len)) != sizeof(len))
return NSERROR_SAVE_FAILED;
if (write(fd, nsurl_access(ent->url), len) != len)
if (write(fd, nsurl_access(ent->url), len) != (ssize_t)len)
return NSERROR_SAVE_FAILED;
if (write(fd, ent, sizeof(*ent)) != sizeof(*ent))
return NSERROR_SAVE_FAILED;
@ -1164,7 +1164,7 @@ read_entries(struct store_state *state)
free(fname);
return NSERROR_NOMEM;
}
if (read(fd, url, urllen) != urllen) {
if (read(fd, url, urllen) != (ssize_t)urllen) {
free(url);
close(fd);
free(fname);