Merge branch 'master' of ssh://axboe@router.home.kernel.dk/data/git/blktrace
authorJens Axboe <axboe@nelson>
Fri, 7 Oct 2005 09:18:13 +0000 (11:18 +0200)
committerJens Axboe <axboe@nelson>
Fri, 7 Oct 2005 09:18:13 +0000 (11:18 +0200)
blkparse_fmt.c

index 8031a8e661bba91bdabec497a4ba24dace9fe594..34b920b2256de9caf6250444f08fc10c780edcf7 100644 (file)
@@ -79,14 +79,11 @@ static inline void fill_rwbs(char *rwbs, struct blk_io_trace *t)
        rwbs[i] = '\0';
 }
 
-static int pdu_rest_is_zero(unsigned char *pdu, int len)
+static inline int pdu_rest_is_zero(unsigned char *pdu, int len)
 {
-       int i = 0;
-
-       while (!pdu[i] && i < len)
-               i++;
+       static char zero[4096];
 
-       return i == len;
+       return !memcmp(pdu, zero, len);
 }
 
 static char *dump_pdu(unsigned char *pdu_buf, int pdu_len)