Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix uninitialized warning.



details:   https://anonhg.NetBSD.org/src/rev/965248f55b86
branches:  trunk
changeset: 554625:965248f55b86
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Oct 30 21:19:02 2003 +0000

description:
Fix uninitialized warning.

diffstat:

 sys/dev/ic/mk48txx.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r fb14f8155765 -r 965248f55b86 sys/dev/ic/mk48txx.c
--- a/sys/dev/ic/mk48txx.c      Thu Oct 30 21:02:55 2003 +0000
+++ b/sys/dev/ic/mk48txx.c      Thu Oct 30 21:19:02 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mk48txx.c,v 1.10 2002/02/23 17:18:56 scw Exp $ */
+/*     $NetBSD: mk48txx.c,v 1.11 2003/10/30 21:19:02 matt Exp $ */
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mk48txx.c,v 1.10 2002/02/23 17:18:56 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mk48txx.c,v 1.11 2003/10/30 21:19:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -104,16 +104,15 @@
 
        i = sizeof(mk48txx_models)/sizeof(mk48txx_models[0]);
        while (--i >= 0) {
-               if (strcmp(model, mk48txx_models[i].name) == 0) {
-                       nvramsz = mk48txx_models[i].nvramsz;
-                       clkoff = mk48txx_models[i].clkoff;
+               if (strcmp(model, mk48txx_models[i].name) == 0)
                        break;
-               }
        }
        if (i < 0) {
                printf(": unsupported model");
                return (NULL);
        }
+       nvramsz = mk48txx_models[i].nvramsz;
+       clkoff = mk48txx_models[i].clkoff;
 
        sz = ALIGN(sizeof(struct todr_chip_handle)) + sizeof(struct mk48txx);
        handle = malloc(sz, M_DEVBUF, M_NOWAIT);



Home | Main Index | Thread Index | Old Index