commit a09813538d85a05d7eb5adf470834eb996391a07
parent 253d3a83fa37c241595e1ccb06332b0d06917443
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 19 Dec 2018 18:50:10 +0100
tls_write: check return value correctly
Diffstat:
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;
}