vhost: remove redundant NULL check in parse_core_mask
This is a private function that is only called in one place, and cpumask is always provided. Additionally, the code inside the mask == NULL || cpumask == NULL check always writes to *cpumask, so it was not possible to pass NULL as cpumask anyway. Change-Id: I2cde53dfeb07edc8a8f87f4ff485ec0c5c9ba7a8 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/376685 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
018e488cbc
commit
52ae747fe2
@ -314,7 +314,7 @@ spdk_vhost_parse_core_mask(const char *mask, uint64_t *cpumask)
|
||||
{
|
||||
char *end;
|
||||
|
||||
if (mask == NULL || cpumask == NULL) {
|
||||
if (mask == NULL) {
|
||||
*cpumask = spdk_app_get_core_mask();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user