Skip to content

Commit 3ebd0e0

Browse files
Arthur AllshireJames Ward
Arthur Allshire
authored and
James Ward
committed
Interface code bugfixes
1 parent 4787dcb commit 3ebd0e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

udp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int set_up_socket()
2929

3030
if((getifaddrs(&ifap)) == -1) {
3131
printf("Error: obtaining network interface information (getifaddrs)");
32-
return -1
32+
return -1;
3333
}
3434

3535
// set ports for the broadcast addresses
@@ -67,7 +67,7 @@ int udp_send(float *data, unsigned int length)
6767
struct sockaddr_in *ba = (struct sockaddr_in *)ifa->ifa_broadaddr;
6868
bytes_sent = sendto(sockfd, msg, strlen(msg), 0, (struct sockaddr *) ba, sizeof(struct sockaddr));
6969
if (bytes_sent == -1) {
70-
printf("Error: sendto function failed on interface: %s, broadcast address: %s\n", ifa->ifa_name, (inet_ntoa((struct sockaddr_in *) ifa->ifa_broadaddr)));
70+
printf("Error: sendto function failed on interface: %s\n", ifa->ifa_name);
7171
return_flag = -1;
7272
}
7373
}

0 commit comments

Comments
 (0)