Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rbootd set *errmsg to errbuf, preventing coredump i...



details:   https://anonhg.NetBSD.org/src/rev/decf58f95171
branches:  trunk
changeset: 503381:decf58f95171
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Feb 05 02:37:34 2001 +0000

description:
set *errmsg to errbuf, preventing coredump if no interfaces are up

diffstat:

 usr.sbin/rbootd/bpf.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 9cf90489ae0d -r decf58f95171 usr.sbin/rbootd/bpf.c
--- a/usr.sbin/rbootd/bpf.c     Mon Feb 05 02:09:37 2001 +0000
+++ b/usr.sbin/rbootd/bpf.c     Mon Feb 05 02:37:34 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.10 2000/04/13 08:52:44 itojun Exp $  */
+/*     $NetBSD: bpf.c,v 1.11 2001/02/05 02:37:34 lukem Exp $   */
 
 /*
  * Copyright (c) 1988, 1992 The University of Utah and the Center
@@ -51,7 +51,7 @@
 #if 0
 static char sccsid[] = "@(#)bpf.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: bpf.c,v 1.10 2000/04/13 08:52:44 itojun Exp $");
+__RCSID("$NetBSD: bpf.c,v 1.11 2001/02/05 02:37:34 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -233,6 +233,9 @@
        static char device[IFNAMSIZ + 1];
        static char errbuf[128] = "No Error!";
 
+       if (errmsg != NULL)
+               *errmsg = errbuf;
+
        if (getifaddrs(&ifap) != 0) {
                (void) strcpy(errbuf, "bpf: getifaddrs: %m");
                return(NULL);



Home | Main Index | Thread Index | Old Index