Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rpc.bootparamd Avoid using a long to store an IP ad...
details: https://anonhg.NetBSD.org/src/rev/a958a04e0f5c
branches: trunk
changeset: 467439:a958a04e0f5c
user: nathanw <nathanw%NetBSD.org@localhost>
date: Wed Mar 24 22:01:38 1999 +0000
description:
Avoid using a long to store an IP address and simplify slightly.
Makes this work on the Alpha.
(What, nobody's netbooted a sun from an alpha before?)
diffstat:
usr.sbin/rpc.bootparamd/bootparamd.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r 41c4c9713e3e -r a958a04e0f5c usr.sbin/rpc.bootparamd/bootparamd.c
--- a/usr.sbin/rpc.bootparamd/bootparamd.c Wed Mar 24 21:48:36 1999 +0000
+++ b/usr.sbin/rpc.bootparamd/bootparamd.c Wed Mar 24 22:01:38 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootparamd.c,v 1.17 1998/02/12 03:36:42 lukem Exp $ */
+/* $NetBSD: bootparamd.c,v 1.18 1999/03/24 22:01:38 nathanw Exp $ */
/*
* This code is not copyright, and is placed in the public domain.
@@ -11,7 +11,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootparamd.c,v 1.17 1998/02/12 03:36:42 lukem Exp $");
+__RCSID("$NetBSD: bootparamd.c,v 1.18 1999/03/24 22:01:38 nathanw Exp $");
#endif
#include <sys/types.h>
@@ -140,8 +140,7 @@
{
static bp_whoami_res res;
struct hostent *he;
- struct in_addr inaddr;
- long haddr;
+ struct in_addr haddr;
if (debug)
warnx("whoami got question for %d.%d.%d.%d",
@@ -164,8 +163,7 @@
strncpy(askname, he->h_name, sizeof(askname));
askname[sizeof(askname)-1] = 0;
} else {
- inaddr.s_addr = haddr;
- strncpy(askname, inet_ntoa(inaddr), sizeof(askname));
+ strncpy(askname, inet_ntoa(haddr), sizeof(askname));
askname[sizeof(askname)-1] = 0;
}
Home |
Main Index |
Thread Index |
Old Index