[PATCH] check do_foo return value before show_stat()
authorMing Zhang <blackmagic02881@gmail.com>
Thu, 21 Dec 2006 14:56:19 +0000 (15:56 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 21 Dec 2006 14:56:19 +0000 (15:56 +0100)
current code will show_stats() even when do_foo() return non zero.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blkparse.c

index b4c371a1cf5db9787de77d6268929e9a1b852aab..6bb53080cedb1ec53b477507c1352c6fc6c29e1b 100644 (file)
@@ -2654,7 +2654,9 @@ int main(int argc, char *argv[])
        else
                ret = do_file();
 
-       show_stats();
+       if (!ret)
+               show_stats();
+
        if (ofp_buffer) {
                fflush(ofp);
                free(ofp_buffer);