From 35ef92a3c4d9ab7db760a49859088f6e4eb335e9 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 28 Jun 2013 14:53:46 +0300 Subject: [PATCH] comparison: save correct link name This doesn't affect how the code works, but it's useful for debugging to have an non-corrupted link name. Signed-off-by: Dan Carpenter --- smatch_comparison.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/smatch_comparison.c b/smatch_comparison.c index 09e9260e..a6bfea93 100644 --- a/smatch_comparison.c +++ b/smatch_comparison.c @@ -376,10 +376,12 @@ struct smatch_state *alloc_link_state(struct string_list *links) i = 0; FOR_EACH_PTR(links, tmp) { - if (!i++) + if (!i++) { snprintf(buf, sizeof(buf), "%s", tmp); - else - snprintf(buf, sizeof(buf), "%s, %s", buf, tmp); + } else { + append(buf, ", ", sizeof(buf)); + append(buf, tmp, sizeof(buf)); + } } END_FOR_EACH_PTR(tmp); state->name = alloc_sname(buf); -- 2.11.4.GIT