Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/isdn/isdnd Don't attempt to use an uninitialized va...



details:   https://anonhg.NetBSD.org/src/rev/9708c618daa5
branches:  trunk
changeset: 581502:9708c618daa5
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 05:54:44 2005 +0000

description:
Don't attempt to use an uninitialized variable in a debug message.
Detected with gcc -Wuninitialized.

diffstat:

 usr.sbin/isdn/isdnd/support.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 0c453e8fb245 -r 9708c618daa5 usr.sbin/isdn/isdnd/support.c
--- a/usr.sbin/isdn/isdnd/support.c     Thu Jun 02 05:45:59 2005 +0000
+++ b/usr.sbin/isdn/isdnd/support.c     Thu Jun 02 05:54:44 2005 +0000
@@ -27,7 +27,7 @@
  *     i4b daemon - misc support routines
  *     ----------------------------------
  *
- *     $Id: support.c,v 1.13 2004/10/30 08:19:30 dsl Exp $ 
+ *     $Id: support.c,v 1.14 2005/06/02 05:54:44 lukem Exp $ 
  *
  * $FreeBSD$
  *
@@ -52,7 +52,6 @@
 find_active_entry_by_driver(int drivertype, int driverunit)
 {
        struct cfg_entry *cep = NULL;
-       int i;
 
        SIMPLEQ_FOREACH(cep, &cfg_entry_list, cfgq) {
 
@@ -66,7 +65,7 @@
                
                if (isvalidtime(cep) == 0)
                {
-                       DBGL(DL_MSG, (logit(LL_DBG, "find_active_entry_by_driver: entry %d, time not valid!", i)));
+                       DBGL(DL_MSG, (logit(LL_DBG, "find_active_entry_by_driver: entry %d, time not valid!", cep->index)));
                        continue;
                }
                



Home | Main Index | Thread Index | Old Index