Skip to contentSkip to conversation

Fix error->errno typo

PATCH In review Jianwen Ji 2 participants 2 messages Dec 17, 2018 SCTP protocol

lore
Share & tools
lore

Jianwen Ji

author
#0 lore raw

PATCH 1/1 Fix error->errno typo

---
 src/apps/sctp_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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
#1 lore raw
Quoted 10 lines · Jianwen Ji
---
 src/apps/sctp_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/apps/sctp_test.c +0 -0
index 4aa2d13..cd7654b 100644

src/apps/sctp_test.c int receive_r(int sk, int once) · line 873

Quoted 5 lines
src/apps/sctp_test.c +1 -1
@@ -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) {

There is a similar one in sctp_status:

apps]$ git grep -B1 'error....E'
sctp_status.c- error = recvmsg(sk, &inmessage, MSG_WAITALL);
sctp_status.c: if (error < 0 && error != EAGAIN) {
--
sctp_test.c- error = recvmsg(recvsk, &inmessage, MSG_WAITALL);
sctp_test.c: if (error < 0 && error != EAGAIN) {

mind sending a patch fixing it too? Thanks.

Quoted 6 lines
src/apps/sctp_test.c +0 -0
 			if (errno = ENOTCONN && socket_type = SOCK_STREAM &&
 			    role = SERVER) {
 				printf("No association is present now!!\n");
Signature · 1 line
2.9.5