Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0211/4

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


Handle empty patterns correctly.
 [rsc] --rw-rw-r-- M 771144 glenda sys 21874 Feb 11 09:16 sys/src/cmd/replica/applylog.c
	/n/sourcesdump/2006/0211/plan9/sys/src/cmd/replica/applylog.c:68,73 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/cmd/replica/applylog.c:68,75
	  
	  	for(i=0; i<nres; i++){
	  		len = strlen(res[i].name);
	+ 		if(len == 0)
	+ 			return res[i].c;
	  		if(strncmp(name, res[i].name, len) == 0 && (name[len]=='/' || name[len] == 0))
	  			return res[i].c;
	  	}
	/n/sourcesdump/2006/0211/plan9/sys/src/cmd/replica/applylog.c:762,767 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/cmd/replica/applylog.c:764,771
	  		return 1;
	  	for(i=0; i<nmatch; i++){
	  		len = strlen(match[i]);
	+ 		if(len == 0)
	+ 			return 1;
	  		if(strncmp(s, match[i], len) == 0 && (s[len]=='/' || s[len] == 0))
	  			return 1;
	  	}


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