From 1ab092348ad5b93469e4e341d7031dc4a822ab13 Mon Sep 17 00:00:00 2001 From: wuzhouhui Date: Fri, 2 Nov 2018 15:00:28 +0800 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/431725 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/bdev/raid/bdev_raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bdev/raid/bdev_raid.c b/lib/bdev/raid/bdev_raid.c index a27f7c3cd..f1d6e591d 100644 --- a/lib/bdev/raid/bdev_raid.c +++ b/lib/bdev/raid/bdev_raid.c @@ -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; }