Commit de21d8f4 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7082


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent b67aa514
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -351,10 +351,8 @@ nbd_io_xmit_check(struct spdk_nbd_disk *nbd)
static int
nbd_cleanup_io(struct spdk_nbd_disk *nbd)
{
	int rc;

	/* 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 */
	if (nbd->io_in_recv != NULL) {