]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Minor mem error fix and splint fix
authorWillem Toorop <willem@NLnetLabs.nl>
Fri, 13 May 2011 09:36:45 +0000 (09:36 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Fri, 13 May 2011 09:36:45 +0000 (09:36 +0000)
dnssec_zone.c
ldns/common.h

index a989c7f450ffab661befa9a2be7645ab5d19f370..1b57d22a4701673f596a7b168104e846ac40c4de 100644 (file)
@@ -817,7 +817,7 @@ ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone)
                                }
                                new_name->name = ldns_dname_clone_from(next_name,
                                                                       i);
-                               if (!new_name) {
+                               if (!new_name->name) {
                                        ldns_dnssec_name_free(new_name);
                                        return LDNS_STATUS_MEM_ERR;
                                }
index 71e594eae987216357c7ecae04de719751829217..c400c1a8f04dce60095a895caf6bffa40e49a286 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef LDNS_COMMON_H
 #define LDNS_COMMON_H
 
+/*@ignore@*/
+/* splint barfs on this construct */
 #ifdef HAVE_STDBOOL_H
 # include <stdbool.h>
 #else
@@ -30,6 +32,7 @@ typedef bool _Bool;
 # define true 1
 # define __bool_true_false_are_defined 1
 #endif
+/*@end@*/
 
 #ifdef HAVE_ATTR_FORMAT
 #define ATTR_FORMAT(archetype, string_index, first_to_check) \