Initialize 'error' in all cases in ioctl handler, otherwise it doesn't

compile (and of course might return garbage).  [hi kim!]
This commit is contained in:
skrll 2005-02-06 09:33:23 +00:00
parent d16fd94009
commit b48e30cb2e
2 changed files with 6 additions and 4 deletions

View File

@ -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 @@ ex_ioctl(ifp, cmd, data)
&& ((ifp->if_flags & (~RESETIGN))
== (sc->sc_if_flags & (~RESETIGN)))) {
ex_set_mc(sc);
error = 0;
break;
#undef RESETIGN
}

View File

@ -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 @@ tlp_ioctl(ifp, cmd, data)
== (sc->sc_if_flags & (~RESETIGN)))) {
/* Set up the receive filter. */
(*sc->sc_filter_setup)(sc);
error = 0;
break;
#undef RESETIGN
}