shithub: riscv

Download patch

ref: 59dd0af53a0b6ab4eb6283e6296d23b256ab7eec
parent: c1fd7c210bdafe97e7b8d07dc256f4b089df9342
author: cinap_lenrek <[email protected]>
date: Mon Nov 7 16:39:28 EST 2016

ip/tcp: remove useless nil checks for padblock() and allocb() return value

--- a/sys/src/9/ip/tcp.c
+++ b/sys/src/9/ip/tcp.c
@@ -1034,14 +1034,10 @@
 	if(data) {
 		dlen = blocklen(data);
 		data = padblock(data, hdrlen + TCP6_PKT);
-		if(data == nil)
-			return nil;
 	}
 	else {
 		dlen = 0;
 		data = allocb(hdrlen + TCP6_PKT + 64);	/* the 64 pad is to meet mintu's */
-		if(data == nil)
-			return nil;
 		data->wp += hdrlen + TCP6_PKT;
 	}