tls_write: check return value correctly - hurl - Gopher/HTTP/HTTPS file grabber | |
git clone git://git.codemadness.org/hurl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit a09813538d85a05d7eb5adf470834eb996391a07 | |
parent 253d3a83fa37c241595e1ccb06332b0d06917443 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Wed, 19 Dec 2018 18:50:10 +0100 | |
tls_write: check return value correctly | |
Diffstat: | |
M hurl.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/hurl.c b/hurl.c | |
@@ -217,7 +217,7 @@ https_request(void) | |
"Connection: close\r\n" | |
"%s" | |
"\r\n", u.path, u.host, config_custom ? config_custom : ""); | |
- if ((r = tls_write(t, buf, strlen(buf))) == -1) { | |
+ if ((r = tls_write(t, buf, strlen(buf))) < 0) { | |
fprintf(stderr, "tls_write: %s\n", tls_error(t)); | |
goto err; | |
} |