Source-Changes-HG archive

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

[src/trunk]: src/dist/dhcp/omapip omapi_io_destroy(): ensure last is initiali...



details:   https://anonhg.NetBSD.org/src/rev/d22b120287e8
branches:  trunk
changeset: 581532:d22b120287e8
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 11:09:02 2005 +0000

description:
omapi_io_destroy(): ensure last is initialized before use, similar to the
method used in omapi_unregister_io_object().
Detected with gcc -Wuninitialized

diffstat:

 dist/dhcp/omapip/dispatch.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 45572e8f55e3 -r d22b120287e8 dist/dhcp/omapip/dispatch.c
--- a/dist/dhcp/omapip/dispatch.c       Thu Jun 02 10:54:58 2005 +0000
+++ b/dist/dhcp/omapip/dispatch.c       Thu Jun 02 11:09:02 2005 +0000
@@ -513,6 +513,7 @@
        obj = (omapi_io_object_t *)h;
 
        /* remove from the list of I/O states */
+       last = &omapi_io_states;
        for (p = omapi_io_states.next; p; p = p -> next) {
                if (p == obj) {
                        omapi_io_dereference (&last -> next, MDL);



Home | Main Index | Thread Index | Old Index