Skip to content

Commit 23d8a96

Browse files
committed
if / if to if / else refactor
1 parent 873de36 commit 23d8a96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/toddog_udp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ void udp(const unsigned short port, char* message)
99
memset((char *)&oAddr, 0,sizeof(oAddr));
1010
oAddr.sin_family = AF_INET;
1111
oAddr.sin_port = htons(port);
12-
oAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
12+
oAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // set the address for localhost
1313
if((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1){
14-
return;
14+
return;
1515
}
1616
sendto(sock, message, strlen(message) + 1, MSG_CONFIRM, (struct sockaddr *)&oAddr, iAddrLen);
1717
return;

0 commit comments

Comments
 (0)