]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
removed double FREEs, lint checks
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 5 Apr 2005 14:05:40 +0000 (14:05 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 5 Apr 2005 14:05:40 +0000 (14:05 +0000)
parse.c
rr.c

diff --git a/parse.c b/parse.c
index 77b2057c3e428be69e0e1615ec46d5c94be97c72..6bb89251411c785deaaaefaf88186ff9c3e9727e 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -129,7 +129,7 @@ tokenread:
                return 0;
        } else {
                *t = '\0';
-               return i;
+               return (ssize_t)i;
        }
 }
 
@@ -241,6 +241,6 @@ tokenread:
                return 0;
        } else {
                *t = '\0';
-               return i;
+               return (ssize_t)i;
        }
 }
diff --git a/rr.c b/rr.c
index ffba340abed3ec88caec7ecdeb727a20a26d671c..538530063631bec377ca2ca49e921185af505a1d 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -164,11 +164,11 @@ ldns_rr_new_frm_str(const char *str)
                        strlen(str_normalized));
        
        /* split the rr in its parts */
-       ldns_bget_token(rr_buf, owner, "\t \0", MAX_DOMAINLEN);
-       ldns_bget_token(rr_buf, ttl, "\t \0", 21);
-       ldns_bget_token(rr_buf, clas, "\t \0", 11);
-       ldns_bget_token(rr_buf, type, "\t \0", 10);
-       ldns_bget_token(rr_buf, rdata, "\0", MAX_PACKETLEN);
+       (void)ldns_bget_token(rr_buf, owner, "\t \0", MAX_DOMAINLEN);
+       (void)ldns_bget_token(rr_buf, ttl, "\t \0", 21);
+       (void)ldns_bget_token(rr_buf, clas, "\t \0", 11);
+       (void)ldns_bget_token(rr_buf, type, "\t \0", 10);
+       (void)ldns_bget_token(rr_buf, rdata, "\0", MAX_PACKETLEN);
        
        FREE(str_normalized);
 
@@ -223,11 +223,6 @@ ldns_rr_new_frm_str(const char *str)
 
        ldns_rr_push_rdf(new, r);
 
-       FREE(owner);
-       FREE(ttl);
-       FREE(clas);
-       FREE(type);
-
        FREE(rdata);
        return new;
 }