Only print ts->description if set for non-terse output
authorJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 19:05:59 +0000 (21:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 19:05:59 +0000 (21:05 +0200)
Identical to commit 4b0f2258, but for non-terse output.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c

diff --git a/stat.c b/stat.c
index 5e0fe4369ec2bdb5787e8c29670a3d0a0027a955..d310686d1295fb3653a34e656efdb72c98fcfe0e 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -520,7 +520,7 @@ void show_thread_status(struct thread_stat *ts, struct group_run_stats *rs)
                                        ts->error, ts->verror, (int) ts->pid);
        }
 
                                        ts->error, ts->verror, (int) ts->pid);
        }
 
-       if (ts->description)
+       if (strlen(ts->description))
                log_info("  Description  : [%s]\n", ts->description);
 
        if (ts->io_bytes[DDIR_READ])
                log_info("  Description  : [%s]\n", ts->description);
 
        if (ts->io_bytes[DDIR_READ])