Initialize resid variable

Properly initialize the variable resid for the error case where
vn_rdwr() returns an error with setting *resid.  In practice
this is harmless because the contents of resid don't matter
when vn_rdwr() returns an error.  But the code does check the
result which means we may or may not end up having the check
zio->io_error.  This makes gcc unhappy and having a completely
deterministic code path here is a good thing.

Closes #51
This commit is contained in:
Brian Behlendorf 2010-08-12 21:19:01 -07:00
parent 11ce7ab08f
commit 2b89d86fff
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ vdev_file_io_start(zio_t *zio)
{
vdev_t *vd = zio->io_vd;
vdev_file_t *vf = vd->vdev_tsd;
ssize_t resid;
ssize_t resid = 0;
if (zio->io_type == ZIO_TYPE_IOCTL) {
/* XXPOLICY */