lib/nbd: fix deadStore issue in nbd_cleanup_io()
Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' Fixes #1860 Change-Id: Id1001552e635968e373cad0fd27d7bda41d887cd Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7082 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b67aa514a4
commit
de21d8f4e4
@ -351,10 +351,8 @@ nbd_io_xmit_check(struct spdk_nbd_disk *nbd)
|
|||||||
static int
|
static int
|
||||||
nbd_cleanup_io(struct spdk_nbd_disk *nbd)
|
nbd_cleanup_io(struct spdk_nbd_disk *nbd)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
/* Try to read the remaining nbd commands in the socket */
|
/* Try to read the remaining nbd commands in the socket */
|
||||||
while ((rc = nbd_io_recv_internal(nbd)) > 0);
|
while (nbd_io_recv_internal(nbd) > 0);
|
||||||
|
|
||||||
/* free io_in_recv */
|
/* free io_in_recv */
|
||||||
if (nbd->io_in_recv != NULL) {
|
if (nbd->io_in_recv != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user