]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
small fries.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 7 Dec 2007 14:54:10 +0000 (14:54 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 7 Dec 2007 14:54:10 +0000 (14:54 +0000)
git-svn-id: file:///svn/unbound/trunk@821 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
doc/Changelog
smallapp/unbound-host.c

index 0d5a2abd4485ac9117a480937f1c284055001691..fedf9faa654cc3b49ccc0da79ddea37bfbe51ace 100644 (file)
@@ -91,7 +91,7 @@ LIBUNBOUND_SRC=$(patsubst $(srcdir)/%,%, \
 LIBUNBOUND_OBJ=$(addprefix $(BUILD),$(LIBUNBOUND_SRC:.c=.o)) $(COMPAT_OBJ)
 ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \
        $(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) $(SIGNIT_SRC) \
-       $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC)
+       $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC)
 ALL_OBJ=$(addprefix $(BUILD),$(ALL_SRC:.c=.o) \
        $(addprefix compat/,$(LIBOBJS))) $(COMPAT_OBJ)
 
index 94e3d6e16b3c771a3347618b89dd8d13b2ea4967..d227a3fe0ffdcb14338b61bebd30a03f08f154a0 100644 (file)
@@ -7,6 +7,7 @@
        - updated ldns-src.tar.gz with ldns-trunk today (1.2.2 fixes).
        - size_t to int for portability of the header file.
        - fixup bogus handling.
+       - dependencies and lint for unbound-host.
 
 6 December 2007: Wouter
        - library resolution works in foreground mode, unbound-host app
index 54d2ec39f81e8a6704c18db01d6feaeeab3e0b0b..4b5651943590c61b0e4d16052613ac4b57a543cd 100644 (file)
@@ -72,7 +72,7 @@ usage()
        exit(1);
 }
 
-/** determine if str is ip4 */
+/** determine if str is ip4 and put into reverse lookup format */
 static int
 isip4(const char* nm, char** res)
 {
@@ -83,13 +83,13 @@ isip4(const char* nm, char** res)
                return 0;
        }
        snprintf(buf, sizeof(buf), "%u.%u.%u.%u.in-addr.arpa",
-               ((uint8_t*)&addr)[3], ((uint8_t*)&addr)[2],
-               ((uint8_t*)&addr)[1], ((uint8_t*)&addr)[0]);
+               (unsigned)((uint8_t*)&addr)[3], (unsigned)((uint8_t*)&addr)[2],
+               (unsigned)((uint8_t*)&addr)[1], (unsigned)((uint8_t*)&addr)[0]);
        *res = strdup(buf);
        return 1;
 }
 
-/** determine if str is ip6 */
+/** determine if str is ip6 and put into reverse lookup format */
 static int
 isip6(const char* nm, char** res)
 {
@@ -112,6 +112,10 @@ isip6(const char* nm, char** res)
        }
        snprintf(buf+16*4, sizeof(buf)-16*4, "ip6.arpa");
        *res = strdup(buf);
+       if(!*res) {
+               fprintf(stderr, "error: out of memory\n");
+               exit(1);
+       }
        return 1;
 }
 
@@ -183,7 +187,7 @@ statstr(int sec, struct ub_val_result* result)
 static void
 pretty_type(char* s, size_t len, int t)
 {
-       const ldns_rr_descriptor *d = ldns_rr_descript(t);
+       const ldns_rr_descriptor *d = ldns_rr_descript((uint16_t)t);
        if(d) {
                snprintf(s, len, "%s", d->_name);
        } else {