From b1f25f716eba43eddecdc9731b9901a3b7d19a54 Mon Sep 17 00:00:00 2001 From: JoriPaananen Date: Wed, 7 Oct 2009 08:28:13 +0000 Subject: [PATCH] Drawing 1 in Openoffice Draw format. Fixed inet_aton return check. git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@392 e16421f0-f15b-0410-abcd-98678b794739 --- tests/ledbattest2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ledbattest2.cpp b/tests/ledbattest2.cpp index 2b8b0ad..e0e8ea1 100644 --- a/tests/ledbattest2.cpp +++ b/tests/ledbattest2.cpp @@ -183,7 +183,7 @@ int main (int argc, char** argv) { while ((opt = getopt(argc, argv, "a:d:s:h")) != -1) switch (opt) { case 'd': - if ((inet_aton(optarg, (struct in_addr *)&dest_addr)) == -1) { + if (!inet_aton(optarg, (struct in_addr *)&dest_addr)) { fprintf(stderr, "inet_aton failed for addr: %s\n", optarg); return -1; } -- 2.20.1