Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet avoid an uninitialised variable warning. this o...



details:   https://anonhg.NetBSD.org/src/rev/b36ec9fdb3dc
branches:  trunk
changeset: 766852:b36ec9fdb3dc
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jul 03 09:03:32 2011 +0000

description:
avoid an uninitialised variable warning.  this one seems a false
positive, but since it's for some hacky workaround code anyway...

diffstat:

 sys/netinet/udp_usrreq.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b0fdcfd5f8ec -r b36ec9fdb3dc sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Sun Jul 03 08:57:43 2011 +0000
+++ b/sys/netinet/udp_usrreq.c  Sun Jul 03 09:03:32 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp_usrreq.c,v 1.180 2011/05/03 18:28:45 dyoung Exp $  */
+/*     $NetBSD: udp_usrreq.c,v 1.181 2011/07/03 09:03:32 mrg Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.180 2011/05/03 18:28:45 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.181 2011/07/03 09:03:32 mrg Exp $");
 
 #include "opt_inet.h"
 #include "opt_compat_netbsd.h"
@@ -1300,6 +1300,7 @@
        {
                struct in_addr laddr;                   /* XXX */
 
+               memset(&laddr, 0, sizeof laddr);
                if (nam) {
                        laddr = inp->inp_laddr;         /* XXX */
                        if ((so->so_state & SS_ISCONNECTED) != 0) {



Home | Main Index | Thread Index | Old Index