diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-03 11:14:44 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-03 11:14:44 -0700 |
commit | 53ea283fa1cfd5559c8966735234f692c89841e4 (patch) | |
tree | 090da5f9db907a538c11ad3770bccffe5204477a | |
parent | b73ba8244a1c04503f151c20f2eee8ccf58a0646 (diff) | |
parent | c7c1b9272450cc0477d11e4733195b2f349a930c (diff) |
Merge pull request #556 from jin-eld/no-printouts
Remove error printouts
-rw-r--r-- | toxcore/LAN_discovery.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index 8998e0a9..880593d2 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c | |||
@@ -45,7 +45,6 @@ static uint32_t get_broadcast(void) | |||
45 | 45 | ||
46 | /* Configure ifconf for the ioctl call. */ | 46 | /* Configure ifconf for the ioctl call. */ |
47 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { | 47 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { |
48 | perror("[!] get_broadcast: socket() error"); | ||
49 | return 0; | 48 | return 0; |
50 | } | 49 | } |
51 | 50 | ||
@@ -56,7 +55,6 @@ static uint32_t get_broadcast(void) | |||
56 | count = ifconf.ifc_len / sizeof(struct ifreq); | 55 | count = ifconf.ifc_len / sizeof(struct ifreq); |
57 | 56 | ||
58 | if (ioctl(sock, SIOCGIFCONF, &ifconf) < 0) { | 57 | if (ioctl(sock, SIOCGIFCONF, &ifconf) < 0) { |
59 | perror("get_broadcast: ioctl() error"); | ||
60 | return 0; | 58 | return 0; |
61 | } | 59 | } |
62 | 60 | ||
@@ -64,7 +62,6 @@ static uint32_t get_broadcast(void) | |||
64 | /* Skip the loopback interface, as it's useless. */ | 62 | /* Skip the loopback interface, as it's useless. */ |
65 | if (strcmp(i_faces[i].ifr_name, "lo") != 0) { | 63 | if (strcmp(i_faces[i].ifr_name, "lo") != 0) { |
66 | if (ioctl(sock, SIOCGIFBRDADDR, &i_faces[i]) < 0) { | 64 | if (ioctl(sock, SIOCGIFBRDADDR, &i_faces[i]) < 0) { |
67 | perror("[!] get_broadcast: ioctl error"); | ||
68 | return 0; | 65 | return 0; |
69 | } | 66 | } |
70 | 67 | ||
@@ -77,7 +74,6 @@ static uint32_t get_broadcast(void) | |||
77 | close(sock); | 74 | close(sock); |
78 | 75 | ||
79 | if (sock_holder == NULL) { | 76 | if (sock_holder == NULL) { |
80 | perror("[!] no broadcast device found"); | ||
81 | return 0; | 77 | return 0; |
82 | } | 78 | } |
83 | 79 | ||