Commits

David du Colombier committed 5145cfe

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

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

  • Participants
  • Parent commits 7e693f5

Comments (0)

Files changed (1)

File src/cmd/fossil/9p.c

 		}
 		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;
 	/*
 	 * 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;
 	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.
 		 */
 		tsync = 0;
 	}
 
-	if(dir.mtime != ~0){
+	if(dir.mtime != (u32int)~0){
 		if(dir.mtime != de.mtime){
 			de.mtime = dir.mtime;
 			op = 1;