Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2007/0413/8

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/sys/src/cmd/cwfs/9p1.c
% cat >/sys/lib/dist/changes/1176501605.1.txt << EOF
This is a pointer, so let's not cast it as such since we have a type for it.
EOF
 [geoff] --rw-rw-r-- M 121 geoff sys 29749 Apr 13 17:35 sys/src/cmd/cwfs/9p1.c
	/n/sourcesdump/2007/0413/plan9/sys/src/cmd/cwfs/9p1.c:37,43 - 
	/n/sources/plan9/sys/src/cmd/cwfs/9p1.c:37,43
	  {
	  	int i;
	  
	- 	srand((ulong)aip + time(nil));
	+ 	srand((uintptr)aip + time(nil));
	  	for(i = 0; i < CHALLEN; i++)
	  		aip->chal[i] = nrand(256);
	  
 [geoff] --rw-rw-r-- M 121 geoff sys 5842 Apr 13 17:35 sys/src/cmd/cwfs/auth.c
	/n/sourcesdump/2007/0413/plan9/sys/src/cmd/cwfs/auth.c:141,147 - 
	/n/sources/plan9/sys/src/cmd/cwfs/auth.c:141,147
	  	int i;
	  
	  if(*why)print("authentication failed: %s: %s\n", phasename[s->phase], why);
	- 	srand((ulong)s + time(nil));
	+ 	srand((uintptr)s + time(nil));
	  	for(i = 0; i < CHALLEN; i++)
	  		s->tr.chal[i] = nrand(256);
	  	s->uid = -1;
 [geoff] --rw-rw-r-- M 121 geoff sys 4722 Apr 13 17:34 sys/src/cmd/cwfs/iobuf.c
	/n/sourcesdump/2007/0413/plan9/sys/src/cmd/cwfs/iobuf.c:15,21 - 
	/n/sources/plan9/sys/src/cmd/cwfs/iobuf.c:15,21
	  
	  	if(DEBUG)
	  		print("getbuf %Z(%lld) f=%x\n", d, (Wideoff)addr, flag);
	- 	h = addr + (Off)d*1009;
	+ 	h = addr + (Off)(uintptr)d*1009;
	  	if(h < 0)
	  		h = ~h;
	  	h %= nhiob;
 [geoff] --rw-rw-r-- M 121 geoff sys 28859 Apr 13 17:35 sys/src/cmd/cwfs/juke.c
 [geoff] --rw-rw-r-- M 121 geoff sys 24371 Apr 13 17:34 sys/src/cmd/cwfs/sub.c
	/n/sourcesdump/2007/0413/plan9/sys/src/cmd/cwfs/sub.c:116,122 - 
	/n/sources/plan9/sys/src/cmd/cwfs/sub.c:116,122
	  	if(fid == NOFID)
	  		return 0;
	  
	- 	h = (long)cp + fid;
	+ 	h = (long)(uintptr)cp + fid;
	  	if(h < 0)
	  		h = ~h;
	  	h %= nelem(flist);
	/n/sourcesdump/2007/0413/plan9/sys/src/cmd/cwfs/sub.c:201,207 - 
	/n/sources/plan9/sys/src/cmd/cwfs/sub.c:201,207
	  	if(!fp || !(cp = fp->cp))
	  		return;
	  
	- 	h = (long)cp + fp->fid;
	+ 	h = (long)(uintptr)cp + fp->fid;
	  	if(h < 0)
	  		h = ~h;
	  	h %= nelem(flist);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].