do not touch __ss_len directly, they are not supposed to be touched.

This commit is contained in:
itojun 1999-12-16 06:00:24 +00:00
parent a650ffbfaf
commit 2c4f20dd99
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fingerd.c,v 1.12 1999/09/26 10:08:43 kleink Exp $ */
/* $NetBSD: fingerd.c,v 1.13 1999/12/16 06:00:25 itojun Exp $ */
/*
* Copyright (c) 1983, 1993
@ -43,7 +43,7 @@ static char const copyright[] =
#if 0
static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93";
#else
static char const rcsid[] = "$NetBSD: fingerd.c,v 1.12 1999/09/26 10:08:43 kleink Exp $";
static char const rcsid[] = "$NetBSD: fingerd.c,v 1.13 1999/12/16 06:00:25 itojun Exp $";
#endif
#endif /* not lint */
@ -122,7 +122,7 @@ main(argc, argv)
sval = sizeof(ss);
if (getpeername(0, (struct sockaddr *)&ss, &sval) < 0)
err("getpeername: %s", strerror(errno));
(void)getnameinfo((struct sockaddr *)&ss, ss.__ss_len,
(void)getnameinfo((struct sockaddr *)&ss, sval,
hostbuf, sizeof(hostbuf), NULL, 0, 0);
lp = hostbuf;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: telnetd.c,v 1.18 1999/07/11 03:04:14 thorpej Exp $ */
/* $NetBSD: telnetd.c,v 1.19 1999/12/16 06:00:24 itojun Exp $ */
/*
* Copyright (C) 1997 and 1998 WIDE Project.
@ -69,7 +69,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
#else
__RCSID("$NetBSD: telnetd.c,v 1.18 1999/07/11 03:04:14 thorpej Exp $");
__RCSID("$NetBSD: telnetd.c,v 1.19 1999/12/16 06:00:24 itojun Exp $");
#endif
#endif /* not lint */
@ -548,7 +548,7 @@ main(argc, argv)
}
#if defined(IPPROTO_IP) && defined(IP_TOS)
if (from.__ss_family == AF_INET) {
if (((struct sockaddr *)&from)->sa_family == AF_INET) {
# if defined(HAS_GETTOS)
struct tosent *tp;
if (tos < 0 && (tp = gettosbyname("telnet", "tcp")))