Commit 1ab09234 authored by wuzhouhui's avatar wuzhouhui Committed by Jim Harris
Browse files

bdev/raid: avoid reference null pointer in log message



glibc will print "(null)" if we pass a null pointer as the argument for
a %s conversion, but it is not a standard behavior.

Change-Id: I85a6b4d571a60e7f3755d13722247e7494998a94
Signed-off-by: default avatarwuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/431725


Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent aef69a98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -960,7 +960,7 @@ raid_bdev_parse_raid(struct spdk_conf_section *conf_section)

	raid_name = spdk_conf_section_get_val(conf_section, "Name");
	if (raid_name == NULL) {
		SPDK_ERRLOG("raid_name %s is null\n", raid_name);
		SPDK_ERRLOG("raid_name is null\n");
		return -EINVAL;
	}