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: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-on: https://review.gerrithub.io/431725 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
aef69a986b
commit
1ab092348a
@ -960,7 +960,7 @@ raid_bdev_parse_raid(struct spdk_conf_section *conf_section)
|
|||||||
|
|
||||||
raid_name = spdk_conf_section_get_val(conf_section, "Name");
|
raid_name = spdk_conf_section_get_val(conf_section, "Name");
|
||||||
if (raid_name == NULL) {
|
if (raid_name == NULL) {
|
||||||
SPDK_ERRLOG("raid_name %s is null\n", raid_name);
|
SPDK_ERRLOG("raid_name is null\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user