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

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


Less dereferencing of nil.
 [rsc] --rw-rw-r-- M 1190573 glenda sys 14527 Oct 10 17:25 sys/src/cmd/wikifs/tohtml.c
	/n/sourcesdump/2005/1010/plan9/sys/src/cmd/wikifs/tohtml.c:401,414 - 
	/n/sourcesdump/2005/1011/plan9/sys/src/cmd/wikifs/tohtml.c:401,414
	  			if(p[0]=='<' || p[0]=='>' || p[0]=='-')
	  				continue;
	  			p[Blinelen(&b)-1] = '\0';
	- 			if((q = strpbrk(p, "acd")) == nil)
	+ 			if((p = strpbrk(p, "acd")) == nil)
	  				continue;
	- 			n1 = atoi(q+1);
	- 			if(q = strchr(q, ','))
	+ 			n1 = atoi(p+1);
	+ 			if(q = strchr(p, ','))
	  				n2 = atoi(q+1);
	  			else
	  				n2 = n1;
	- 			switch(*q){
	+ 			switch(*p){
	  			case 'a':
	  			case 'c':
	  				s = s_append(s, "<span class='old_text'>");
 [sys] --rwxrwxr-x M 1190573 glenda sys 202470 Oct 10 23:07 386/bin/wikifs
	/sys/src/cmd/wikifs/tohtml.c:s_diff


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.