tls_write: check return value correctly - hurl - Gopher/HTTP/HTTPS file grabber
 (HTM) git clone git://git.codemadness.org/hurl
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit a09813538d85a05d7eb5adf470834eb996391a07
 (DIR) parent 253d3a83fa37c241595e1ccb06332b0d06917443
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       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(-)
       ---
 (DIR) 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;
                }