From: Jens Axboe Date: Fri, 18 Jun 2010 07:21:45 +0000 (+0200) Subject: Fix bad int truncate in verify X-Git-Tag: fio-1.40~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b6bf4995922789978a43954c53d501b159d15b0e;p=fio.git Fix bad int truncate in verify Signed-off-by: Jens Axboe --- diff --git a/verify.c b/verify.c index 6932cfcd..ace5b75f 100644 --- a/verify.c +++ b/verify.c @@ -160,7 +160,7 @@ static void *hdr_priv(struct verify_header *hdr) * Return data area 'header_num' */ static inline void *io_u_verify_off(struct verify_header *hdr, - struct io_u *io_u, unsigned char header_num) + struct io_u *io_u, unsigned int header_num) { return io_u->buf + header_num * hdr->len + hdr_size(hdr); } @@ -260,7 +260,7 @@ static int verify_io_u_sha1(struct verify_header *hdr, struct io_u *io_u, } static int verify_io_u_crc7(struct verify_header *hdr, struct io_u *io_u, - unsigned char header_num) + unsigned int header_num) { void *p = io_u_verify_off(hdr, io_u, header_num); struct vhdr_crc7 *vh = hdr_priv(hdr);