Skip to contentSkip to conversation

Fix error->errno typos

PATCH Applied Jianwen Ji 2 participants 2 messages Dec 18, 2018 – Dec 21, 2018 SCTP protocol

lore
Share & tools
lore

Jianwen Ji

author
#0 lore raw

PATCH 1/1 Fix error->errno typos

---
 src/apps/sctp_status.c | 2 +-
 src/apps/sctp_test.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/apps/sctp_status.c +1 -1
index 46e9ca2..8563cbe 100644
@@ -529,7 +529,7 @@ int receive_r(int sk)
 		DEBUG_PRINT(DEBUG_MIN, "\trecvmsg(sk=%d) ", sk);
 
 		error = recvmsg(sk, &inmessage, MSG_WAITALL);
-		if (error < 0 && error != EAGAIN) {
+		if (error < 0 && errno != EAGAIN) {
 			fprintf(stderr, "\n\t\t*** recvmsg: %s ***\n\n",
 					strerror(errno));
 			fflush(stdout);
src/apps/sctp_test.c +1 -1
index 4aa2d13..cd7654b 100644
@@ -870,7 +870,7 @@ int receive_r(int sk, int once)
 		DEBUG_PRINT(DEBUG_MIN, "\trecvmsg(sk=%d) ", sk);
 
 		error = recvmsg(recvsk, &inmessage, MSG_WAITALL);
-		if (error < 0 && error != EAGAIN) {
+		if (error < 0 && errno != EAGAIN) {
 			if (errno = ENOTCONN && socket_type = SOCK_STREAM &&
 			    role = SERVER) {
 				printf("No association is present now!!\n");
Signature · 1 line
2.9.5