From 3fcc209df911ca39a2c218fdacdd92eefb5ab281 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 26 Sep 2013 22:31:11 +0200 Subject: fossil: cast Qid.vers, Dir.mode and Qid.mtime to u32int (thanks Tim Kack) R=rsc https://codereview.appspot.com/13981043 --- src/cmd/fossil/9p.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/fossil') diff --git a/src/cmd/fossil/9p.c b/src/cmd/fossil/9p.c index 01033596..6738670e 100644 --- a/src/cmd/fossil/9p.c +++ b/src/cmd/fossil/9p.c @@ -165,7 +165,7 @@ rTwstat(Msg* m) } tsync = 0; } - if(dir.qid.vers != ~0){ + if(dir.qid.vers != (u32int)~0){ if(dir.qid.vers != de.mcount){ werrstr("wstat -- attempt to change qid.vers"); goto error; @@ -189,7 +189,7 @@ rTwstat(Msg* m) /* * Check .qid.type and .mode agree if neither is defaulted. */ - if(dir.qid.type != (uchar)~0 && dir.mode != ~0){ + if(dir.qid.type != (uchar)~0 && dir.mode != (u32int)~0){ if(dir.qid.type != ((dir.mode>>24) & 0xFF)){ werrstr("wstat -- qid.type/mode mismatch"); goto error; @@ -199,7 +199,7 @@ rTwstat(Msg* m) op = 0; oldmode = de.mode; - if(dir.qid.type != (uchar)~0 || dir.mode != ~0){ + if(dir.qid.type != (uchar)~0 || dir.mode != (u32int)~0){ /* * .qid.type or .mode isn't defaulted, check for unknown bits. */ @@ -236,7 +236,7 @@ rTwstat(Msg* m) tsync = 0; } - if(dir.mtime != ~0){ + if(dir.mtime != (u32int)~0){ if(dir.mtime != de.mtime){ de.mtime = dir.mtime; op = 1; -- cgit v1.2.3