scst_vdisk: Remove a superfluous cast

The 'iov_base' member of 'struct iovec' is declared in
<uapi/linux/uio.h> with type 'void __user *'. Adding an integer
to a void pointer has the same effect as adding an integer to
a char pointer in the C language. This means that it is safe to
remove the cast in front of the eiv->iov_base pointer.

Please note that a similar construct already exists in the iSCSI
target driver. From the nthread.c source file:

			iop->iov_base += rest;
			iop->iov_len -= rest;

This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5847 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2014-10-17 02:22:23 +00:00
parent 5e5d9a8164
commit f2fd09d3b2

View File

@@ -5116,8 +5116,7 @@ restart:
eiv++;
eiv_count--;
} else {
eiv->iov_base =
(uint8_t __force __user *)eiv->iov_base + err;
eiv->iov_base += err;
eiv->iov_len -= err;
break;
}