From bbf352892d40b0a9a7e32eba3774737d96092ac7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 6 May 2024 22:46:09 +0200 Subject: [PATCH] cov: use literal for printf Use literal for printf and just empty string if needed. --- lib/metadata/raid_manip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 7803ded27..ae915d006 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -5057,7 +5057,7 @@ static int _rename_area_lvs(struct logical_volume *lv, const char *suffix) /* Create _generate_raid_name() suffixes w/ or w/o passed in @suffix */ for (s = 0; s < SLV_COUNT; s++) if (!(sfx[s] = dm_pool_alloc(lv->vg->cmd->mem, sz)) || - dm_snprintf(sfx[s], sz, suffix ? "%s%s" : "%s", s ? "rmeta" : "rimage", suffix) < 0) + dm_snprintf(sfx[s], sz, "%s%s", (s) ? "rmeta" : "rimage", (suffix) ? : "") < 0) return_0; /* Change names (temporarily) to be able to shift numerical name suffixes */