summaryrefslogtreecommitdiff
path: root/tests/pskself.c
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/pskself.c
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/pskself.c')
-rw-r--r--tests/pskself.c2
1 files changed, 1 insertions, 1 deletions
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");