diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-06-15 23:49:54 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-06-15 23:49:54 +0000 |
commit | 2e4e9b90cb613b32969504f14642838cad9d5f31 (patch) | |
tree | d1e68253ff648c78e1e631171910b024d7b356bb /sys/netsmb | |
parent | e622d327e5f02efe846738ac48071275cdd3a234 (diff) | |
download | FreeBSD-src-2e4e9b90cb613b32969504f14642838cad9d5f31.zip FreeBSD-src-2e4e9b90cb613b32969504f14642838cad9d5f31.tar.gz |
Initialize some variables that GCC4.2 thinks might possibly be used without
being initialized.
Diffstat (limited to 'sys/netsmb')
-rw-r--r-- | sys/netsmb/smb_smb.c | 2 | ||||
-rw-r--r-- | sys/netsmb/smb_trantcp.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c index 6393a9f..d6633e7 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 3f4ccaf..7bdf211 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)) { |