diff options
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 5 | ||||
-rw-r--r-- | lib-src/pop.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 35190fd2a8f..f5846657707 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Paul Eggert <eggert@cs.ucla.edu> + + * pop.c (socket_connection) [HAVE_GETADDRINFO]: + Prefer assignment to memcpy when either will do. + 2012-08-31 Andreas Schwab <schwab@linux-m68k.org> * etags.c (consider_token): Always zero-terminate token buffer. diff --git a/lib-src/pop.c b/lib-src/pop.c index 74054e0e1b1..bfbcb8c9466 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1083,7 +1083,7 @@ socket_connection (char *host, int flags) if (it->ai_addrlen == sizeof (addr)) { struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; - memcpy (&addr.sin_addr, &in_a->sin_addr, sizeof (addr.sin_addr)); + addr.sin_addr = in_a->sin_addr; if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) break; } |