Source-Changes-HG archive

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

[src/trunk]: src/sys/modules/lua initialize variables



details:   https://anonhg.NetBSD.org/src/rev/6ed831570a60
branches:  trunk
changeset: 790989:6ed831570a60
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Tue Oct 29 17:35:04 2013 +0000

description:
initialize variables

diffstat:

 sys/modules/lua/lua.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 0b44a0a721c3 -r 6ed831570a60 sys/modules/lua/lua.c
--- a/sys/modules/lua/lua.c     Tue Oct 29 16:39:10 2013 +0000
+++ b/sys/modules/lua/lua.c     Tue Oct 29 17:35:04 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lua.c,v 1.3 2013/10/23 18:57:40 mbalmer Exp $ */
+/*     $NetBSD: lua.c,v 1.4 2013/10/29 17:35:04 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2011, 2013 by Marc Balmer <mbalmer%NetBSD.org@localhost>.
@@ -226,7 +226,7 @@
 luaopen(dev_t dev, int flag, int mode, struct lwp *l)
 {
        struct lua_softc *sc;
-       int error;
+       int error = 0;
 
        if (minor(dev) > 0)
                return ENXIO;
@@ -595,7 +595,7 @@
        klua_State *K;
        struct lua_state *s;
        struct lua_softc *sc;
-       int error;
+       int error = 0;
 
        s = malloc(sizeof(struct lua_state), NULL, M_ZERO);
        if (s == NULL)
@@ -653,7 +653,7 @@
        struct lua_state *s;
        struct lua_softc *sc;
        struct lua_module *m;
-       int error;
+       int error = 0;
 
        /* Notify the Lua state that it is about to be closed */
        if (klua_lock(K))
@@ -707,7 +707,7 @@
        struct lua_state *s;
        struct lua_softc *sc;
        klua_State *K;
-       int error;
+       int error = 0;
 
        K = NULL;
        sc = device_private(sc_self);



Home | Main Index | Thread Index | Old Index