summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Sampson <ats@offog.org>2013-07-16 15:16:22 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-07-17 21:38:54 +0200
commitc851d827f90a84a7cbbeb0a8a56bafab269ca6ef (patch)
treea8b7e114a99cba3acee693eae08ba880d62e1189 /tests
parentbef38b98c0536d81c0e4b2e78a9182e1df1d451c (diff)
downloadgnutls-c851d827f90a84a7cbbeb0a8a56bafab269ca6ef.tar.gz
Detect socket() error responses correctly.
The code was testing the wrong variable... Signed-off-by: Adam Sampson <ats@offog.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/anonself.c2
-rw-r--r--tests/dhepskself.c2
-rw-r--r--tests/openpgpself.c2
-rw-r--r--tests/pskself.c2
-rw-r--r--tests/resume-dtls.c2
-rw-r--r--tests/resume.c2
-rw-r--r--tests/x509dn.c2
-rw-r--r--tests/x509self.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/tests/anonself.c b/tests/anonself.c
index 3aa8e6b406..ef69d52595 100644
--- a/tests/anonself.c
+++ b/tests/anonself.c
@@ -209,7 +209,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/dhepskself.c b/tests/dhepskself.c
index 5ca7e999fe..18c0366b71 100644
--- a/tests/dhepskself.c
+++ b/tests/dhepskself.c
@@ -218,7 +218,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/openpgpself.c b/tests/openpgpself.c
index fb30229dd4..e904acc285 100644
--- a/tests/openpgpself.c
+++ b/tests/openpgpself.c
@@ -493,7 +493,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/pskself.c b/tests/pskself.c
index aa698dfd73..e04914e4de 100644
--- a/tests/pskself.c
+++ b/tests/pskself.c
@@ -209,7 +209,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c
index 7fbe7b0185..89b88d01b8 100644
--- a/tests/resume-dtls.c
+++ b/tests/resume-dtls.c
@@ -305,7 +305,7 @@ global_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/resume.c b/tests/resume.c
index 03b51644ae..a87e80f58c 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -296,7 +296,7 @@ global_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/x509dn.c b/tests/x509dn.c
index ff79fb828b..81402d1d0e 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -389,7 +389,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");
diff --git a/tests/x509self.c b/tests/x509self.c
index 859a0b1c29..14b6f3bf92 100644
--- a/tests/x509self.c
+++ b/tests/x509self.c
@@ -351,7 +351,7 @@ server_start (void)
/* Socket operations
*/
listen_sd = socket (AF_INET, SOCK_STREAM, 0);
- if (err == -1)
+ if (listen_sd == -1)
{
perror ("socket");
fail ("server: socket failed\n");