Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Initialize 'error' in all cases in ioctl handler, ...



details:   https://anonhg.NetBSD.org/src/rev/d78b79b51e29
branches:  trunk
changeset: 573736:d78b79b51e29
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Feb 06 09:33:23 2005 +0000

description:
Initialize 'error' in all cases in ioctl handler, otherwise it doesn't
compile (and of course might return garbage).  [hi kim!]

diffstat:

 sys/dev/ic/elinkxl.c |  5 +++--
 sys/dev/ic/tulip.c   |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r 788cb3689dba -r d78b79b51e29 sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Sun Feb 06 08:52:08 2005 +0000
+++ b/sys/dev/ic/elinkxl.c      Sun Feb 06 09:33:23 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.77 2005/02/06 03:15:14 kim Exp $ */
+/*     $NetBSD: elinkxl.c,v 1.78 2005/02/06 09:33:23 skrll Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.77 2005/02/06 03:15:14 kim Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.78 2005/02/06 09:33:23 skrll Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -1395,6 +1395,7 @@
                    && ((ifp->if_flags & (~RESETIGN))
                    == (sc->sc_if_flags & (~RESETIGN)))) {
                        ex_set_mc(sc);
+                       error = 0;
                        break;
 #undef RESETIGN
                }
diff -r 788cb3689dba -r d78b79b51e29 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Sun Feb 06 08:52:08 2005 +0000
+++ b/sys/dev/ic/tulip.c        Sun Feb 06 09:33:23 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.133 2005/02/06 03:15:14 kim Exp $  */
+/*     $NetBSD: tulip.c,v 1.134 2005/02/06 09:33:23 skrll Exp $        */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.133 2005/02/06 03:15:14 kim Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.134 2005/02/06 09:33:23 skrll Exp $");
 
 #include "bpfilter.h"
 
@@ -1014,6 +1014,7 @@
                    == (sc->sc_if_flags & (~RESETIGN)))) {
                        /* Set up the receive filter. */
                        (*sc->sc_filter_setup)(sc);
+                       error = 0;
                        break;
 #undef RESETIGN
                }



Home | Main Index | Thread Index | Old Index