From c851d827f90a84a7cbbeb0a8a56bafab269ca6ef Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Tue, 16 Jul 2013 15:16:22 +0100 Subject: Detect socket() error responses correctly. The code was testing the wrong variable... Signed-off-by: Adam Sampson --- tests/x509self.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/x509self.c') 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"); -- cgit v1.2.1