Commit fd661859 authored by yidong0635's avatar yidong0635 Committed by Tomasz Zawadzki
Browse files

nvmf/ctrlr: Fix scanbuild warning.



Issue:
ctrlr.c:1851:13: warning: Although the value stored
to 'copy_len' is used in the enclosing expression,
the value is never actually read from 'copy_len'
        next_pos = copy_len = 0;
                   ^          ~

Signed-off-by: default avataryidong0635 <dongx.yi@intel.com>
Change-Id: Ie6d402cd4ad206ae5713deb15e2d03929bac94f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4823


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
parent 5c91e9d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1850,7 +1850,7 @@ nvmf_get_reservation_notification_log_page(struct spdk_nvmf_ctrlr *ctrlr,
		return;
	}

	next_pos = copy_len = 0;
	next_pos = 0;
	TAILQ_FOREACH_SAFE(log, &ctrlr->log_head, link, log_tmp) {
		TAILQ_REMOVE(&ctrlr->log_head, log, link);
		ctrlr->num_avail_log_pages--;