diff options
author | Elliott Hughes <enh@google.com> | 2014-05-19 15:55:29 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-05-19 15:55:29 -0700 |
commit | f51d3e87671110c508f0f71d9bcb1bf54c22ca3b (patch) | |
tree | 2d2c034902bf0b3f1ec7fc5f59083a0b40e39cfc /libc/upstream-openbsd | |
parent | 308c30af72da7b13938934ba5037dd347b1ef139 (diff) | |
download | bionic-f51d3e87671110c508f0f71d9bcb1bf54c22ca3b.zip bionic-f51d3e87671110c508f0f71d9bcb1bf54c22ca3b.tar.gz bionic-f51d3e87671110c508f0f71d9bcb1bf54c22ca3b.tar.bz2 |
Switch back to OpenBSD inet_ntop now they're FORTIFY clean.
Change-Id: I04798a4966c352a8a12feebdff9646e3bad5933f
Diffstat (limited to 'libc/upstream-openbsd')
-rw-r--r-- | libc/upstream-openbsd/lib/libc/net/inet_ntop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/upstream-openbsd/lib/libc/net/inet_ntop.c b/libc/upstream-openbsd/lib/libc/net/inet_ntop.c index 359acd8..f991a07 100644 --- a/libc/upstream-openbsd/lib/libc/net/inet_ntop.c +++ b/libc/upstream-openbsd/lib/libc/net/inet_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_ntop.c,v 1.9 2014/02/05 14:20:43 millert Exp $ */ +/* $OpenBSD: inet_ntop.c,v 1.10 2014/05/17 18:16:14 tedu Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -71,11 +71,11 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size) static const char * inet_ntop4(const u_char *src, char *dst, size_t size) { - static const char fmt[] = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; int l; - l = snprintf(tmp, size, fmt, src[0], src[1], src[2], src[3]); + l = snprintf(tmp, sizeof(tmp), "%u.%u.%u.%u", + src[0], src[1], src[2], src[3]); if (l <= 0 || l >= size) { errno = ENOSPC; return (NULL); |