0669dd6aef
submitted upstream, itojun@ ok
25 lines
898 B
Plaintext
25 lines
898 B
Plaintext
$OpenBSD: patch-lib_sockunion_c,v 1.1 2003/04/16 08:27:55 avsm Exp $
|
|
--- lib/sockunion.c.orig Fri Jun 21 21:00:38 2002
|
|
+++ lib/sockunion.c Tue Apr 15 22:41:19 2003
|
|
@@ -302,16 +302,16 @@ sockunion_log (union sockunion *su)
|
|
switch (su->sa.sa_family)
|
|
{
|
|
case AF_INET:
|
|
- snprintf (buf, BUFSIZ, "%s", inet_ntoa (su->sin.sin_addr));
|
|
+ snprintf (buf, sizeof buf, "%s", inet_ntoa (su->sin.sin_addr));
|
|
break;
|
|
#ifdef HAVE_IPV6
|
|
case AF_INET6:
|
|
- snprintf (buf, BUFSIZ, "%s",
|
|
- inet_ntop (AF_INET6, &(su->sin6.sin6_addr), buf, BUFSIZ));
|
|
+ snprintf (buf, sizeof buf, "%s",
|
|
+ inet_ntop (AF_INET6, &(su->sin6.sin6_addr), buf, sizeof buf));
|
|
break;
|
|
#endif /* HAVE_IPV6 */
|
|
default:
|
|
- snprintf (buf, BUFSIZ, "af_unknown %d ", su->sa.sa_family);
|
|
+ snprintf (buf, sizeof buf, "af_unknown %d ", su->sa.sa_family);
|
|
break;
|
|
}
|
|
return buf;
|