Properly catch and report getaddrinfo() errors
commitb5a6f7a23a368ffb31fbf48cdffe95541166d3fa
authorIsaac Jurado <diptongo@gmail.com>
Sat, 8 Nov 2014 17:06:45 +0000 (8 18:06 +0100)
committerJens Rantil <jens.rantil@tink.se>
Sun, 19 Aug 2018 18:24:14 +0000 (19 20:24 +0200)
treefc06c91852b1aeebcaca276a5e680155376ca287
parentde55cca8560f7020eaa9b7f1a7dd9d799b425a0d
Properly catch and report getaddrinfo() errors

The getaddrinfo() function does not behave like a system call.  In particular,
the only successful return value is zero; any other value should be considered a
failure, not only -1.

This commit fixes a segfault caused by an invalid value of the "-l" command line
option.

Closes #254 and fixes #253.
net.c