Commit 52ae747f authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376685


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 018e488c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}