From faec0b51db6ef935929a95b289524abac062be8c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 4 Apr 2019 05:04:17 +0000 Subject: [PATCH] Don't show salt in debugging message if salt is null --- src/fccfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fccfg.c b/src/fccfg.c index 9b12744..f2289f1 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -556,11 +556,11 @@ FcConfigAddFontDir (FcConfig *config, { if (m) { - printf ("%s -> %s (salt: %s)\n", d, m, salt); + printf ("%s -> %s%s%s%s\n", d, m, salt ? " (salt: " : "", salt ? (const char *)salt : "", salt ? ")" : ""); } else if (salt) { - printf ("%s (salt: %s)\n", d, salt); + printf ("%s%s%s%s\n", d, salt ? " (salt: " : "", salt ? (const char *)salt : "", salt ? ")" : ""); } } return FcStrSetAddFilenamePairWithSalt (config->fontDirs, d, m, salt);