]> git.armaanb.net Git - sic.git/commitdiff
util: dial: no need for a static struct hints
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 May 2021 23:16:13 +0000 (01:16 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 May 2021 23:16:13 +0000 (01:16 +0200)
util.c

diff --git a/util.c b/util.c
index c2982fde6e8d9ed37062c63780281b8ad47af645..cb966d43c89ae24bae1afcdf32e7136f8ef68367 100644 (file)
--- a/util.c
+++ b/util.c
@@ -18,9 +18,9 @@ eprint(const char *fmt, ...) {
 
 static int
 dial(char *host, char *port) {
 
 static int
 dial(char *host, char *port) {
-       static struct addrinfo hints;
-       int fd;
+       struct addrinfo hints;
        struct addrinfo *res, *r;
        struct addrinfo *res, *r;
+       int fd;
 
        memset(&hints, 0, sizeof hints);
        hints.ai_family = AF_UNSPEC;
 
        memset(&hints, 0, sizeof hints);
        hints.ai_family = AF_UNSPEC;