Fixed compilation for DNS_LOCAL_HOSTLIST==1 and DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1 (bug #28968)

This commit is contained in:
goldsimon 2010-02-22 08:36:23 +00:00
parent 19a9b52c06
commit 68678e21df

View File

@ -430,7 +430,7 @@ dns_local_addhost(const char *hostname, const ip_addr_t *addr)
entry->name = (char*)entry + sizeof(struct local_hostlist_entry); entry->name = (char*)entry + sizeof(struct local_hostlist_entry);
MEMCPY((char*)entry->name, hostname, namelen); MEMCPY((char*)entry->name, hostname, namelen);
((char*)entry->name)[namelen] = 0; ((char*)entry->name)[namelen] = 0;
ip_addr_copy(&entry->addr, addr); ip_addr_copy(entry->addr, *addr);
entry->next = local_hostlist_dynamic; entry->next = local_hostlist_dynamic;
local_hostlist_dynamic = entry; local_hostlist_dynamic = entry;
return ERR_OK; return ERR_OK;