From 3923114da4ef281c6e4e2115a7bc1dd938cad223 Mon Sep 17 00:00:00 2001 From: plutooo Date: Thu, 1 Aug 2013 11:52:13 -0700 Subject: [PATCH] core: getaddrinfo() lookup error handling --- prompt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prompt.c b/prompt.c index 3c4a27d..a3cf2d9 100644 --- a/prompt.c +++ b/prompt.c @@ -83,8 +83,8 @@ static void execute(ToxWindow* self, char* cmd) { dht.port = htons(atoi(port)); - int resolved_address = resolve_addr(ip); - if (resolved_address == -1) { + uint32_t resolved_address = resolve_addr(ip); + if (resolved_address == 0) { return; }