Source-Changes-HG archive

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

[src/trunk]: src/sys/net fix undefined result of stat(), found by clang stati...



details:   https://anonhg.NetBSD.org/src/rev/c459e76c3fb8
branches:  trunk
changeset: 747451:c459e76c3fb8
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Sep 15 19:38:15 2009 +0000

description:
fix undefined result of stat(), found by clang static analyzer

diffstat:

 sys/net/if_tap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d8093c07a79c -r c459e76c3fb8 sys/net/if_tap.c
--- a/sys/net/if_tap.c  Tue Sep 15 19:29:17 2009 +0000
+++ b/sys/net/if_tap.c  Tue Sep 15 19:38:15 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tap.c,v 1.58 2009/07/23 17:53:17 plunky Exp $       */
+/*     $NetBSD: if_tap.c,v 1.59 2009/09/15 19:38:15 drochner Exp $     */
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.58 2009/07/23 17:53:17 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.59 2009/09/15 19:38:15 drochner Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -977,7 +977,7 @@
 static int
 tap_fops_stat(file_t *fp, struct stat *st)
 {
-       int error;
+       int error = 0;
        struct tap_softc *sc;
        int unit = (uintptr_t)fp->f_data;
 



Home | Main Index | Thread Index | Old Index