Check string length of ts->description, not value
authorJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 13:03:25 +0000 (15:03 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 13:03:25 +0000 (15:03 +0200)
It's no longer a pointer. Fix a buglet in the terse output
printing.

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

diff --git a/stat.c b/stat.c
index a053c8be67051bf9014b2136f927eb9ff92303c5..5e0fe4369ec2bdb5787e8c29670a3d0a0027a955 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -701,10 +701,8 @@ static void show_thread_status_terse(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");
 }
 
 static void sum_stat(struct io_stat *dst, struct io_stat *src, int nr)