From dbe703cfb08d136bb47bf768f4b5bde1b2275753 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 28 Sep 2015 08:10:53 +0200 Subject: [PATCH] netdb: fixed warning about pointless comparison --- src/api/netdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/netdb.c b/src/api/netdb.c index 55a18b96..eb918acf 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -353,7 +353,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname, /* invalid name length */ return EAI_FAIL; } - LWIP_ASSERT("namelen is too long", (namelen + 1) <= (mem_size_t)-1); + LWIP_ASSERT("namelen is too long", total_size + namelen + 1 > total_size); total_size += namelen + 1; } /* If this fails, please report to lwip-devel! :-) */