aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-11-05 17:44:04 +0100
committerJiri Pirko <jiri@resnulli.us>2014-11-05 17:44:04 +0100
commit7b967c4ad4f479c00faf825335785df2a88acbcb (patch)
treee1d14c1a3fc7ca34629660651997da2def43cb84
parent1d907b4cc7e5a3f48935f6969bd982e6c4308ce2 (diff)
downloadlibteam-7b967c4ad4f479c00faf825335785df2a88acbcb.tar.gz
teamd: lw_arp_ping: make buf static and avoid returning local pointer
Fixes: 672ddfd506 ("teamd: move arp ping link watcher to a separate file") Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-rw-r--r--teamd/teamd_lw_arp_ping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/teamd/teamd_lw_arp_ping.c b/teamd/teamd_lw_arp_ping.c
index dc7515f..95fbafc 100644
--- a/teamd/teamd_lw_arp_ping.c
+++ b/teamd/teamd_lw_arp_ping.c
@@ -118,7 +118,7 @@ static int set_in_addr(struct in_addr *addr, const char *hostname)
static char *str_in_addr(struct in_addr *addr)
{
struct sockaddr_in sin;
- char buf[NI_MAXHOST];
+ static char buf[NI_MAXHOST];
memcpy(&sin.sin_addr, addr, sizeof(*addr));
return __str_sockaddr((struct sockaddr *) &sin, sizeof(sin), AF_INET,