]> git.ipfire.org Git - people/ms/dma.git/commitdiff
clear up warnings found by clang static analysis
authorSimon Schubert <2@0x2c.org>
Mon, 2 Jan 2012 19:41:02 +0000 (20:41 +0100)
committerSimon Schubert <2@0x2c.org>
Mon, 2 Jan 2012 19:41:02 +0000 (20:41 +0100)
conf.c
dns.c

diff --git a/conf.c b/conf.c
index 4e15b59990f8ddb8c53cb041a934a1ebf2f912be..6e4eb2511b4c26205359e00981bfb3c67c82fd09 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -56,8 +56,6 @@ trim_line(char *line)
        size_t linelen;
        char *p;
 
-       p = line;
-
        if ((p = strchr(line, '\n')))
                *p = (char)0;
 
diff --git a/dns.c b/dns.c
index ce80745730e91d2bc728ed068bfdc30ffa87dcc7..fc5213f1ca605600baa07ebcc9b0281671b133fd 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -66,12 +66,9 @@ add_host(int pref, const char *host, int port, struct mx_hostentry **he, size_t
        struct addrinfo hints, *res, *res0 = NULL;
        char servname[10];
        struct mx_hostentry *p;
-       size_t onhosts;
        const int count_inc = 10;
        int err;
 
-       onhosts = *ps;
-
        memset(&hints, 0, sizeof(hints));
        hints.ai_family = PF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;