From 2e4e9b90cb613b32969504f14642838cad9d5f31 Mon Sep 17 00:00:00 2001 From: mjacob Date: Fri, 15 Jun 2007 23:49:54 +0000 Subject: [PATCH] Initialize some variables that GCC4.2 thinks might possibly be used without being initialized. --- sys/netsmb/smb_smb.c | 2 ++ sys/netsmb/smb_trantcp.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c index 6393a9f05565..d6633e7d9d94 100644 --- a/sys/netsmb/smb_smb.c +++ b/sys/netsmb/smb_smb.c @@ -805,6 +805,7 @@ smb_read(struct smb_share *ssp, u_int16_t fid, struct uio *uio, tsize = uio->uio_resid; while (tsize > 0) { + resid = 0; len = tsize; error = smb_smb_read(ssp, fid, &len, &resid, uio, scred); if (error) @@ -880,6 +881,7 @@ smb_write(struct smb_share *ssp, u_int16_t fid, struct uio *uio, tsize = uio->uio_resid; olduio = *uio; while (tsize > 0) { + resid = 0; len = tsize; error = smb_smb_write(ssp, fid, &len, &resid, uio, scred); if (error) diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c index 3f4ccaffa208..7bdf2116b60b 100644 --- a/sys/netsmb/smb_trantcp.c +++ b/sys/netsmb/smb_trantcp.c @@ -412,6 +412,8 @@ nbssn_recv(struct nbpcb *nbp, struct mbuf **mpp, int *lenp, * Poll for a response header. * If we don't have one waiting, return. */ + len = 0; + rpcode = 0; error = nbssn_recvhdr(nbp, &len, &rpcode, MSG_DONTWAIT, td); if ((so->so_state & (SS_ISDISCONNECTING | SS_ISDISCONNECTED)) || (so->so_rcv.sb_state & SBS_CANTRCVMORE)) {