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:
parent
11ce7ab08f
commit
2b89d86fff
|
@ -143,7 +143,7 @@ vdev_file_io_start(zio_t *zio)
|
||||||
{
|
{
|
||||||
vdev_t *vd = zio->io_vd;
|
vdev_t *vd = zio->io_vd;
|
||||||
vdev_file_t *vf = vd->vdev_tsd;
|
vdev_file_t *vf = vd->vdev_tsd;
|
||||||
ssize_t resid;
|
ssize_t resid = 0;
|
||||||
|
|
||||||
if (zio->io_type == ZIO_TYPE_IOCTL) {
|
if (zio->io_type == ZIO_TYPE_IOCTL) {
|
||||||
/* XXPOLICY */
|
/* XXPOLICY */
|
||||||
|
|
Loading…
Reference in New Issue