From fd8b1b47929cc54ab7a62d721a3c13d78b3c5796 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 29 Jun 2013 12:19:58 +0300 Subject: [PATCH] debug: update debug to handle the new comparison features Signed-off-by: Dan Carpenter --- check_debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/check_debug.c b/check_debug.c index d42743c1..68194adf 100644 --- a/check_debug.c +++ b/check_debug.c @@ -300,21 +300,21 @@ static void match_compare(const char *fn, struct expression *expr, void *info) struct expression *one, *two; char *one_name, *two_name; int comparison; - const char *str; + char buf[16]; one = get_argument_from_call_expr(expr->args, 0); two = get_argument_from_call_expr(expr->args, 1); comparison = get_comparison(one, two); if (!comparison) - str = ""; + snprintf(buf, sizeof(buf), ""); else - str = show_special(comparison); + snprintf(buf, sizeof(buf), "%s", show_special(comparison)); - one_name = expr_to_var(one); - two_name = expr_to_var(two); + one_name = expr_to_str(one); + two_name = expr_to_str(two); - sm_msg("%s %s %s", one_name, str, two_name); + sm_msg("%s %s %s", one_name, buf, two_name); free_string(one_name); free_string(two_name); -- 2.11.4.GIT