Networking: Should fix a few compile errors/warnings reported by Travis

This commit is contained in:
Gregory Nutt 2015-01-30 08:54:40 -06:00
parent f357ba6c80
commit a76b87305a
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* net/udp/udp_callback.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -45,6 +45,7 @@
#include <nuttx/net/netconfig.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
#include <nuttx/net/udp.h>
#include "devif/devif.h"

View File

@ -378,14 +378,15 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf,
socklen_t tolen)
{
FAR struct udp_conn_s *conn;
FAR const struct sockaddr_in *into;
struct sendto_s state;
net_lock_t save;
int ret;
#ifdef CONFIG_NET_ARP_SEND
FAR const struct sockaddr_in *into;
/* Make sure that the IP address mapping is in the ARP table */
#ifdef CONFIG_NET_ARP_SEND
into = (FAR const struct sockaddr_in *)to;
ret = arp_send(into->sin_addr.s_addr);
if (ret < 0)