mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
small fries.
git-svn-id: file:///svn/unbound/trunk@821 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
9f97c4ac44
commit
d6ce1f426d
3 changed files with 11 additions and 6 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue