All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20200621155604.GA23135@minyard.net>

diff --git a/a/1.txt b/N1/1.txt
index c24ca18..a2d17c5 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -70,7 +70,7 @@ waitread(int s)
     ssize_t rv;
 
     rv = read(s, data, sizeof(data));
-    if (rv = -1) {
+    if (rv == -1) {
 	perror("read");
 	return -1;
     }
@@ -91,39 +91,39 @@ do_server(void)
 	return err;
 
     ls = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-    if (ls = -1) {
+    if (ls == -1) {
 	perror("socket");
 	return -1;
     }
 
     optval = 1;
     if (setsockopt(ls, SOL_SOCKET, SO_REUSEADDR,
-		   (void *)&optval, sizeof(optval)) = -1) {
+		   (void *)&optval, sizeof(optval)) == -1) {
 	perror("setsockopt reuseaddr");
 	return -1;
     }
 
     /* Comment this out and it will work. */
     if (setsockopt(ls, IPPROTO_IPV6, IPV6_V6ONLY, &optval,
-		   sizeof(optval)) = -1) {
+		   sizeof(optval)) == -1) {
 	perror("setsockopt ipv6 only");
 	return -1;
     }
 
     err = bind(ls, ai->ai_addr, ai->ai_addrlen);
-    if (err = -1) {
+    if (err == -1) {
 	perror("bind");
 	return -1;
     }
 
     err = listen(ls, 5);
-    if (err = -1) {
+    if (err == -1) {
 	perror("listen");
 	return -1;
     }
 
     s = accept(ls, NULL, NULL);
-    if (s = -1) {
+    if (s == -1) {
 	perror("accept");
 	return -1;
     }
@@ -148,13 +148,13 @@ do_client(void)
 	return err;
 
     s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-    if (s = -1) {
+    if (s == -1) {
 	perror("socket");
 	return -1;
     }
 
     err = connect(s, ai->ai_addr, ai->ai_addrlen);
-    if (err = -1) {
+    if (err == -1) {
 	perror("connect");
 	return -1;
     }
diff --git a/a/content_digest b/N1/content_digest
index a351002..a582cff 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,6 +1,6 @@
  "From\0Corey Minyard <minyard@acm.org>\0"
  "Subject\0Strange problem with SCTP+IPv6\0"
- "Date\0Sun, 21 Jun 2020 15:56:04 +0000\0"
+ "Date\0Sun, 21 Jun 2020 10:56:04 -0500\0"
  "To\0Vlad Yasevich <vyasevich@gmail.com>"
   Neil Horman <nhorman@tuxdriver.com>
   Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
@@ -80,7 +80,7 @@
  "    ssize_t rv;\n"
  "\n"
  "    rv = read(s, data, sizeof(data));\n"
- "    if (rv = -1) {\n"
+ "    if (rv == -1) {\n"
  "\tperror(\"read\");\n"
  "\treturn -1;\n"
  "    }\n"
@@ -101,39 +101,39 @@
  "\treturn err;\n"
  "\n"
  "    ls = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);\n"
- "    if (ls = -1) {\n"
+ "    if (ls == -1) {\n"
  "\tperror(\"socket\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    optval = 1;\n"
  "    if (setsockopt(ls, SOL_SOCKET, SO_REUSEADDR,\n"
- "\t\t   (void *)&optval, sizeof(optval)) = -1) {\n"
+ "\t\t   (void *)&optval, sizeof(optval)) == -1) {\n"
  "\tperror(\"setsockopt reuseaddr\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    /* Comment this out and it will work. */\n"
  "    if (setsockopt(ls, IPPROTO_IPV6, IPV6_V6ONLY, &optval,\n"
- "\t\t   sizeof(optval)) = -1) {\n"
+ "\t\t   sizeof(optval)) == -1) {\n"
  "\tperror(\"setsockopt ipv6 only\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    err = bind(ls, ai->ai_addr, ai->ai_addrlen);\n"
- "    if (err = -1) {\n"
+ "    if (err == -1) {\n"
  "\tperror(\"bind\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    err = listen(ls, 5);\n"
- "    if (err = -1) {\n"
+ "    if (err == -1) {\n"
  "\tperror(\"listen\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    s = accept(ls, NULL, NULL);\n"
- "    if (s = -1) {\n"
+ "    if (s == -1) {\n"
  "\tperror(\"accept\");\n"
  "\treturn -1;\n"
  "    }\n"
@@ -158,13 +158,13 @@
  "\treturn err;\n"
  "\n"
  "    s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);\n"
- "    if (s = -1) {\n"
+ "    if (s == -1) {\n"
  "\tperror(\"socket\");\n"
  "\treturn -1;\n"
  "    }\n"
  "\n"
  "    err = connect(s, ai->ai_addr, ai->ai_addrlen);\n"
- "    if (err = -1) {\n"
+ "    if (err == -1) {\n"
  "\tperror(\"connect\");\n"
  "\treturn -1;\n"
  "    }\n"
@@ -186,4 +186,4 @@
  "    return !!err;\n"
  }
 
-1f8c23265057b2e5f3233edd49b699e02a7234308869fa9bbd00decaae9656d7
+68e7b718ec15a5b23f0efc0be46b68f7778ea7ab3116399a5b239528966d8d1d

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.