From 499a0bc5a65caaf7899f944d657963a60896df7d Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 25 Feb 2020 16:56:45 -0500 Subject: [PATCH] Revert "network: errno should be already negative" --- network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network.c b/network.c index 361d84d9a..3319d1f4f 100644 --- a/network.c +++ b/network.c @@ -1484,7 +1484,7 @@ struct iio_context * network_create_context(const char *host) fd = create_socket(res, DEFAULT_TIMEOUT_MS); if (fd < 0) { - errno = fd; + errno = -fd; goto err_free_addrinfo; }