Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/nfsd Memset the whole cfg array, not piecemeal beca...
details: https://anonhg.NetBSD.org/src/rev/d900c77e1b91
branches: trunk
changeset: 334765:d900c77e1b91
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 05 19:24:41 2014 +0000
description:
Memset the whole cfg array, not piecemeal because otherwise you'll end
up with random data depending on the options set.
XXX: pullup 7
diffstat:
usr.sbin/nfsd/nfsd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 77380b82697a -r d900c77e1b91 usr.sbin/nfsd/nfsd.c
--- a/usr.sbin/nfsd/nfsd.c Fri Dec 05 19:06:41 2014 +0000
+++ b/usr.sbin/nfsd/nfsd.c Fri Dec 05 19:24:41 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfsd.c,v 1.62 2014/03/29 13:50:53 gson Exp $ */
+/* $NetBSD: nfsd.c,v 1.63 2014/12/05 19:24:41 christos Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
#else
-__RCSID("$NetBSD: nfsd.c,v 1.62 2014/03/29 13:50:53 gson Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.63 2014/12/05 19:24:41 christos Exp $");
#endif
#endif /* not lint */
@@ -140,7 +140,6 @@
struct addrinfo hints;
int ecode;
- memset(cfg, 0, sizeof(*cfg));
memset(&hints, 0, sizeof hints);
hints.ai_flags = AI_PASSIVE;
hints.ai_family = cfg_family[t];
@@ -473,6 +472,7 @@
openlog("nfsd", LOG_PID, LOG_DAEMON);
+ memset(cfg, 0, sizeof(cfg));
for (i = 0; i < __arraycount(cfg); i++) {
if (ip4flag == 0 && cfg_family[i] == PF_INET)
continue;
Home |
Main Index |
Thread Index |
Old Index