From 82653d230d9f96c2ddb325f177113b9003e3375c Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 26 Oct 2003 19:09:44 +0000 Subject: [PATCH] Fix uninitialized variable warnings.` --- sys/net/if_ieee1394subr.c | 6 +++--- sys/net/if_spppsubr.c | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/net/if_ieee1394subr.c b/sys/net/if_ieee1394subr.c index bd6542adcd66..bdfc28aba57c 100644 --- a/sys/net/if_ieee1394subr.c +++ b/sys/net/if_ieee1394subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ieee1394subr.c,v 1.24 2003/10/03 20:56:11 itojun Exp $ */ +/* $NetBSD: if_ieee1394subr.c,v 1.25 2003/10/26 19:09:44 christos Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.24 2003/10/03 20:56:11 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.25 2003/10/26 19:09:44 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -424,7 +424,7 @@ ieee1394_reass(struct ifnet *ifp, struct mbuf *m0) struct ieee1394_fraghdr *ifh; struct ieee1394_unfraghdr *iuh; struct ieee1394_reassq *rq; - struct ieee1394_reass_pkt *rp, *trp, *nrp; + struct ieee1394_reass_pkt *rp, *trp, *nrp = NULL; int len; u_int16_t off, ftype, size, dgl; diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index f730a38fb585..27255189efd8 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_spppsubr.c,v 1.71 2003/10/03 10:29:05 oki Exp $ */ +/* $NetBSD: if_spppsubr.c,v 1.72 2003/10/26 19:09:44 christos Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.71 2003/10/03 10:29:05 oki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.72 2003/10/26 19:09:44 christos Exp $"); #include "opt_inet.h" #include "opt_ipx.h" @@ -4757,15 +4757,14 @@ sppp_set_ip_addrs(struct sppp *sp, u_int32_t myaddr, u_int32_t hisaddr) { STDDCL; struct ifaddr *ifa; - struct sockaddr_in *si; - struct sockaddr_in *dest; + struct sockaddr_in *si = NULL; + struct sockaddr_in *dest = NULL; /* XXX: gcc */ /* * Pick the first AF_INET address from the list, * aliases don't make any sense on a p2p link anyway. */ - si = 0; TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr->sa_family == AF_INET) @@ -4816,8 +4815,8 @@ sppp_clear_ip_addrs(struct sppp *sp) { struct ifnet *ifp = &sp->pp_if; struct ifaddr *ifa; - struct sockaddr_in *si; - struct sockaddr_in *dest; + struct sockaddr_in *si = NULL; + struct sockaddr_in *dest = NULL; /* XXX: gcc */ u_int32_t remote; if (sp->ipcp.flags & IPCP_HISADDR_DYN) @@ -4830,7 +4829,6 @@ sppp_clear_ip_addrs(struct sppp *sp) * aliases don't make any sense on a p2p link anyway. */ - si = 0; TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr->sa_family == AF_INET)