Initialize some variables that GCC4.2 thinks might possibly be used without

being initialized.
This commit is contained in:
mjacob 2007-06-15 23:49:54 +00:00
parent e622d327e5
commit 2e4e9b90cb
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)) {