mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 13:11:27 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user