Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1127/1

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


Avoid PADDR(0).
 [jmk] --rw-rw-r-- M 330753 glenda sys 27806 Nov 27 00:07 sys/src/9/pc/sdmylex.c
	/n/sourcesdump/2005/1127/plan9/sys/src/9/pc/sdmylex.c:368,374 - 
	/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/sdmylex.c:368,377
	  	ccb->datalen[0] = n>>16;
	  	ccb->datalen[1] = n>>8;
	  	ccb->datalen[2] = n;
	- 	p = PADDR(data);
	+ 	if(data == nil)
	+ 		p = 0;
	+ 	else
	+ 		p = PADDR(data);
	  	ccb->dataptr[0] = p>>16;
	  	ccb->dataptr[1] = p>>8;
	  	ccb->dataptr[2] = p;
	/n/sourcesdump/2005/1127/plan9/sys/src/9/pc/sdmylex.c:586,592 - 
	/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/sdmylex.c:589,598
	  	ccb->datalen[1] = n>>8;
	  	ccb->datalen[2] = n>>16;
	  	ccb->datalen[3] = n>>24;
	- 	p = PADDR(r->data);
	+ 	if(r->data == nil)
	+ 		p = 0;
	+ 	else
	+ 		p = PADDR(r->data);
	  	ccb->dataptr[0] = p;
	  	ccb->dataptr[1] = p>>8;
	  	ccb->dataptr[2] = p>>16;


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].