diff options
author | ume <ume@FreeBSD.org> | 2003-08-18 15:58:23 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-08-18 15:58:23 +0000 |
commit | 9772e1f2d88c64e7e86ea7cb8d1f2d1c561197b5 (patch) | |
tree | e47031981f054de5f672162d7c0a3e56c58cf251 /usr.sbin/route6d | |
parent | 55adf4bf8ca5b30003acb0f496c4331728a661b2 (diff) | |
download | FreeBSD-src-9772e1f2d88c64e7e86ea7cb8d1f2d1c561197b5.zip FreeBSD-src-9772e1f2d88c64e7e86ea7cb8d1f2d1c561197b5.tar.gz |
- port numbers are unsigned. use %u.
- %d is not 10 chars, but 12 chars.
Obtained from: KAME
MFC after: 1 week
Diffstat (limited to 'usr.sbin/route6d')
-rw-r--r-- | usr.sbin/route6d/route6d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index cdc9b91..9a2507b 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -601,13 +601,13 @@ init() int error; const int int0 = 0, int1 = 1, int255 = 255; struct addrinfo hints, *res; - char port[10]; + char port[NI_MAXSERV]; ifc = (struct ifc *)NULL; nifc = 0; nindex2ifc = 0; /*initial guess*/ index2ifc = NULL; - snprintf(port, sizeof(port), "%d", RIP6_PORT); + snprintf(port, sizeof(port), "%u", RIP6_PORT); memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_INET6; |