Commit d26d2090 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix wrong condition on the result of getaddrinfo().

parent 9bbd8476
......@@ -189,7 +189,7 @@ int ms_discover_mtu(const char *host){
hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_NUMERICHOST;
err = getaddrinfo(host, NULL, &hints, &ai);
if (err >= 0) family = ai->ai_family;
if (err == 0) family = ai->ai_family;
memset(&hints,0,sizeof(hints));
hints.ai_family = family;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment