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

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


Use the same byte order everyone else does.
 [rsc] --rw-rw-r-- M 777458 glenda sys 5611 Dec 23 10:37 sys/src/cmd/ip/ping.c
	/n/sourcesdump/2005/1223/plan9/sys/src/cmd/ip/ping.c:144,151 - 
	/n/sourcesdump/2005/1224/plan9/sys/src/cmd/ip/ping.c:144,150
	  		}
	  		r = malloc(sizeof *r);
	  		if(r != nil){
	- 			ip->seq[0] = seq;
	- 			ip->seq[1] = seq>>8;
	+ 			hnputs(ip->seq, seq);
	  			r->seq = seq;
	  			r->next = nil;
	  			lock(&listlock);
	/n/sourcesdump/2005/1223/plan9/sys/src/cmd/ip/ping.c:200,206 - 
	/n/sourcesdump/2005/1224/plan9/sys/src/cmd/ip/ping.c:199,205
	  				munged++;
	  		if(munged)
	  			print("currupted reply\n");
	- 		x = (ip->seq[1]<<8)|ip->seq[0];
	+ 		x = nhgets(ip->seq);
	  		if(ip->type != EchoReply || ip->code != 0) {
	  			print("bad sequence/code/type %d/%d/%d\n",
	  				ip->type, ip->code, x);


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