From c7c1b9272450cc0477d11e4733195b2f349a930c Mon Sep 17 00:00:00 2001 From: Jin^eLD Date: Tue, 3 Sep 2013 20:18:54 +0300 Subject: Remove error printouts A library should never print anything, so removing the perror() printouts. --- toxcore/LAN_discovery.c | 4 ---- 1 file changed, 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) /* Configure ifconf for the ioctl call. */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - perror("[!] get_broadcast: socket() error"); return 0; } @@ -56,7 +55,6 @@ static uint32_t get_broadcast(void) count = ifconf.ifc_len / sizeof(struct ifreq); if (ioctl(sock, SIOCGIFCONF, &ifconf) < 0) { - perror("get_broadcast: ioctl() error"); return 0; } @@ -64,7 +62,6 @@ static uint32_t get_broadcast(void) /* Skip the loopback interface, as it's useless. */ if (strcmp(i_faces[i].ifr_name, "lo") != 0) { if (ioctl(sock, SIOCGIFBRDADDR, &i_faces[i]) < 0) { - perror("[!] get_broadcast: ioctl error"); return 0; } @@ -77,7 +74,6 @@ static uint32_t get_broadcast(void) close(sock); if (sock_holder == NULL) { - perror("[!] no broadcast device found"); return 0; } -- cgit v1.2.3