From e9048e9b4effa7d96eab7776785ede30de30b17d Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 18 Oct 2008 00:34:12 +0300 Subject: [PATCH] strcmp() doesn't accept NULL arguments. Signed-off-by: Dan Carpenter --- check_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_template.c b/check_template.c index 33cd7027..cab9568d 100644 --- a/check_template.c +++ b/check_template.c @@ -44,7 +44,7 @@ static void match_call(struct expression *expr) char *sem_name; fn_name = get_variable_from_expr(expr->fn, NULL); - if (strcmp(fn_name, "down") && strcmp(fn_name, "up")) + if (!fn_name || (strcmp(fn_name, "down") && strcmp(fn_name, "up"))) return; if (!strcmp(fn_name, "down")) down = 1; -- 2.11.4.GIT