Skip to content

Commit

Permalink
udptty: udp_send: make peer struct static const
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Jenikovsky <[email protected]>
  • Loading branch information
jendo42 committed Jul 7, 2024
1 parent 043b0e3 commit d2fd717
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions iop/network/udptty/src/udptty.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ int _shutdown()
final packet. */
static int udp_send(void *buf, size_t size)
{
struct sockaddr_in peer;

peer.sin_family = AF_INET;
peer.sin_port = htons(18194);
peer.sin_addr.s_addr = inet_addr("255.255.255.255");
static struct sockaddr_in peer = {
.sin_family = AF_INET,
.sin_port = htons(18194),
.sin_addr.s_addr = inet_addr("255.255.255.255")
};

lwip_sendto(udp_socket, buf, size, 0, (struct sockaddr *)&peer, sizeof(peer));

Expand Down

0 comments on commit d2fd717

Please sign in to comment.