Fixed some warnings, changed some debug defines to include better names

This commit is contained in:
goldsimon
2008-07-16 20:36:12 +00:00
parent ae2d5266c5
commit c779a9f29f
3 changed files with 24 additions and 21 deletions

View File

@@ -326,7 +326,8 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
if (nodename != NULL) {
/* copy nodename to canonname if specified */
size_t namelen = strlen(nodename);
ai->ai_canonname = mem_malloc(namelen + 1);
LWIP_ASSERT("namelen is too long", (namelen + 1) <= (mem_size_t)-1);
ai->ai_canonname = mem_malloc((mem_size_t)(namelen + 1));
if (ai->ai_canonname == NULL) {
goto memerr;
}