about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-05-28 19:20:29 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-05-28 19:20:29 +0000
commitfea94cd79f6b2a3a8b8e3f64634af9b641a17822 (patch)
treeec84b4689e36a11afd65a72e8590735e1af2ffaa /Src/parse.c
parent7c4ac8d60b59ae60577ebe8c273f74b90cf93e50 (diff)
downloadzsh-fea94cd79f6b2a3a8b8e3f64634af9b641a17822.tar.gz
zsh-fea94cd79f6b2a3a8b8e3f64634af9b641a17822.tar.xz
zsh-fea94cd79f6b2a3a8b8e3f64634af9b641a17822.zip
Fixed two signed/unsigned comparisons.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 9dd9a18eb..b58652fe4 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2524,9 +2524,8 @@ load_dump_header(char *nam, char *name, int err)
 	}
 	memcpy(head, buf, (FD_PRELEN + 1) * sizeof(wordcode));
 
-	if (read(fd, head + (FD_PRELEN + 1),
-		 len - ((FD_PRELEN + 1) * sizeof(wordcode))) !=
-	    len - ((FD_PRELEN + 1) * sizeof(wordcode))) {
+	len -= (FD_PRELEN + 1) * sizeof(wordcode);
+	if (read(fd, head + (FD_PRELEN + 1), len) != len) {
 	    close(fd);
 	    zwarnnam(nam, "invalid zwc file: %s" , name, 0);
 	    return NULL;
@@ -3125,7 +3124,7 @@ check_dump_file(char *file, struct stat *sbuf, char *name, int *ksh)
 	    }
 	    d = (Wordcode) zalloc(h->len + po);
 
-	    if (read(fd, ((char *) d) + po, h->len) != h->len) {
+	    if (read(fd, ((char *) d) + po, h->len) != (int)h->len) {
 		close(fd);
 		zfree(d, h->len);