From 6a1c87ff4845d4b9de91ddaebe11f1127903a310 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 12 Mar 2013 21:12:31 +0300 Subject: [PATCH] locking: ignore parenthesis Smatch used to get confused and think that: mutex_lock(&(foo)); was different from: mutex_lock(&foo); This is easy to solve by just ignoring all the parenthesis. Signed-off-by: Dan Carpenter --- check_locking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_locking.c b/check_locking.c index d8d7184e..f7aef228 100644 --- a/check_locking.c +++ b/check_locking.c @@ -343,8 +343,8 @@ static char *make_full_name(const char *lock, const char *var) { static char tmp_buf[512]; - snprintf(tmp_buf, 512, "%s:%s", lock, var); - tmp_buf[511] = '\0'; + snprintf(tmp_buf, sizeof(tmp_buf), "%s:%s", lock, var); + remove_parens(tmp_buf); return alloc_string(tmp_buf); } -- 2.11.4.GIT