From 0a3c52f0875c85b6750239a8b65bfe230d28df35 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 14 Apr 2014 08:57:35 -0600 Subject: [PATCH] stat: fix wrong check for whether we have a description or not It's an array, hence never NULL. Check for size instead. Signed-off-by: Jens Axboe --- stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stat.c b/stat.c index 5a553d00..ca733108 100644 --- a/stat.c +++ b/stat.c @@ -831,7 +831,7 @@ static void show_thread_status_terse_v2(struct thread_stat *ts, log_info("\n"); /* Additional output if description is set */ - if (ts->description) + if (strlen(ts->description)) log_info(";%s", ts->description); log_info("\n"); -- 2.25.1