From 02c5bde5a9f8a931ddeff425154bf63ebd82fce3 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 24 Feb 2020 17:43:14 +0000 Subject: [PATCH] fs_backing_store: Fix some comparison types Signed-off-by: Daniel Silverstone --- content/fs_backing_store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c index c2eeb4fc4..ff1c26559 100644 --- a/content/fs_backing_store.c +++ b/content/fs_backing_store.c @@ -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);