diff options
Diffstat (limited to 'net/lwip/net-lwip.c')
-rw-r--r-- | net/lwip/net-lwip.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index 5c2bb2e0361..b863047f598 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -91,9 +91,9 @@ struct netif *net_lwip_get_netif(void) static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip, ip4_addr_t *mask, ip4_addr_t *gw) { - char *ipstr = "ipaddr\0\0"; - char *maskstr = "netmask\0\0"; - char *gwstr = "gatewayip\0\0"; + char ipstr[] = "ipaddr\0\0"; + char maskstr[] = "netmask\0\0"; + char gwstr[] = "gatewayip\0\0"; int idx = dev_seq(dev); char *env; @@ -203,7 +203,6 @@ struct netif *net_lwip_new_netif(struct udevice *udev) struct netif *net_lwip_new_netif_noip(struct udevice *udev) { - return new_netif(udev, false); } @@ -224,24 +223,24 @@ int net_init(void) static struct pbuf *alloc_pbuf_and_copy(uchar *data, int len) { - struct pbuf *p, *q; + struct pbuf *p, *q; - /* We allocate a pbuf chain of pbufs from the pool. */ - p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); - if (!p) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - return NULL; - } + /* We allocate a pbuf chain of pbufs from the pool. */ + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + if (!p) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + return NULL; + } - for (q = p; q != NULL; q = q->next) { - memcpy(q->payload, data, q->len); - data += q->len; - } + for (q = p; q != NULL; q = q->next) { + memcpy(q->payload, data, q->len); + data += q->len; + } - LINK_STATS_INC(link.recv); + LINK_STATS_INC(link.recv); - return p; + return p; } int net_lwip_rx(struct udevice *udev, struct netif *netif) |