tfossil: cast Qid.vers, Dir.mode and Qid.mtime to u32int (thanks Tim Kack) - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 3fcc209df911ca39a2c218fdacdd92eefb5ab281
parent 3c612e13a19b9a7f1d97d3dd82b07e70717e6b63
Author: David du Colombier <0intro@gmail.com>
Date:   Thu, 26 Sep 2013 22:31:11 +0200

fossil: cast Qid.vers, Dir.mode and Qid.mtime to u32int (thanks Tim Kack)

R=rsc
https://codereview.appspot.com/13981043

Diffstat:
  M src/cmd/fossil/9p.c                 |       8 ++++----

1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/cmd/fossil/9p.c b/src/cmd/fossil/9p.c
t@@ -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;
t@@ -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;
t@@ -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.
                  */
t@@ -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;