From 8b9f997ca0d6a7c6f9edf852b3b30b8fcb39ba5a Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Tue, 15 Apr 2003 07:22:47 +0000 Subject: avoid hardcoding 12; use NI_MAXSERV. deraadt ok --- usr.sbin/rip6query/rip6query.c | 4 ++-- usr.sbin/route6d/route6d.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rip6query/rip6query.c b/usr.sbin/rip6query/rip6query.c index a8d512a9b7d..53f34bff0b9 100644 --- a/usr.sbin/rip6query/rip6query.c +++ b/usr.sbin/rip6query/rip6query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rip6query.c,v 1.9 2003/04/14 22:24:58 pvalchev Exp $ */ +/* $OpenBSD: rip6query.c,v 1.10 2003/04/15 07:22:45 itojun Exp $ */ /* $KAME: rip6query.c,v 1.17 2002/09/08 01:35:17 itojun Exp $ */ /* @@ -81,7 +81,7 @@ main(argc, argv) int c; int ifidx = -1; int error; - char pbuf[12]; + char pbuf[NI_MAXSERV]; struct addrinfo hints, *res; while ((c = getopt(argc, argv, "I:w:")) != -1) { diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index acfa128e260..42ddd54c3f5 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6d.c,v 1.34 2003/04/14 22:24:58 pvalchev Exp $ */ +/* $OpenBSD: route6d.c,v 1.35 2003/04/15 07:22:46 itojun Exp $ */ /* $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #if 0 -static char _rcsid[] = "$OpenBSD: route6d.c,v 1.34 2003/04/14 22:24:58 pvalchev Exp $"; +static char _rcsid[] = "$OpenBSD: route6d.c,v 1.35 2003/04/15 07:22:46 itojun Exp $"; #endif #include @@ -587,7 +587,7 @@ init() int i, error; const int int0 = 0, int1 = 1, int255 = 255; struct addrinfo hints, *res; - char port[12]; + char port[NI_MAXSERV]; ifc = (struct ifc *)NULL; nifc = 0; -- cgit v1.2.3