gluon-neighbour-info: fix inet_pton() error message

inet_pton() doesn't set errno on regular parse errors, so using perror()
doesn't make sense (and we avoid a confusing "Success" message).
This commit is contained in:
Matthias Schiffer 2019-04-21 19:08:56 +02:00
parent aeebcf272c
commit fc5f93604e
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -162,7 +162,7 @@ int main(int argc, char **argv) {
break; break;
case 'd': case 'd':
if (!inet_pton(AF_INET6, optarg, &client_addr.sin6_addr)) { if (!inet_pton(AF_INET6, optarg, &client_addr.sin6_addr)) {
perror("Invalid IPv6 address. This message will probably confuse you"); fprintf(stderr, "Invalid destination address\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
break; break;