lib/ftl: assert write pointer from band

This is just assert to assure the Klocwork
static analizer that wptr is not NULL.

Change-Id: I003620431afb8497a57c50af8480c34ec3fac6d6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462489
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Tomasz Zawadzki 2019-07-18 07:08:41 -04:00 committed by Jim Harris
parent db330b7441
commit eb84a1133f
2 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,7 @@ ftl_wptr_from_band(struct ftl_band *band)
}
}
assert(false);
return NULL;
}

View File

@ -1273,5 +1273,6 @@ ftl_restore_device(struct ftl_restore *restore, ftl_restore_fn cb)
/* If restore_device is called, there must be at least one valid band */
rband = ftl_restore_next_band(restore);
assert(rband);
return ftl_restore_tail_md(rband);
}