diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-23 17:07:52 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-23 17:07:52 +0000 |
commit | d760973a5b59906e46def02f8e5aaaf7be601eba (patch) | |
tree | ea006f8d3c387d062324a35dcb7adc406c5c5759 /gg.c | |
parent | 497977d501eb736c37353ec8fa4c83315e025bc0 (diff) |
don't alter the struct iri
Diffstat (limited to 'gg.c')
-rw-r--r-- | gg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -102,9 +102,9 @@ main(int argc, char **argv) if (tls_configure(ctx, conf) == -1) errx(1, "tls_configure: %s", tls_error(ctx)); - if (*iri.port == '\0') - iri.port = (char*)port; - if (tls_connect(ctx, iri.host, iri.port) == -1) + if (*iri.port != '\0') + port = iri.port; + if (tls_connect(ctx, iri.host, port) == -1) errx(1, "tls_connect: %s", tls_error(ctx)); tls_write(ctx, req, strlen(req)); |