From 35b1ec3c4be3ef5c38b30d10c63237fa5220c276 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Wed, 5 Jul 2017 13:46:12 +0200 Subject: [PATCH] libblkid: udf: Fix types --- libblkid/src/superblocks/udf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c index 74f3fd85d8..0169d720cd 100644 --- a/libblkid/src/superblocks/udf.c +++ b/libblkid/src/superblocks/udf.c @@ -136,13 +136,13 @@ static int probe_udf(blkid_probe pr, { struct volume_descriptor *vd; struct volume_structure_descriptor *vsd; - unsigned int bs; - unsigned int pbs[5]; - unsigned int b; - unsigned int type; - unsigned int count; - unsigned int loc; - unsigned int i; + uint32_t bs; + uint32_t pbs[5]; + uint32_t b; + uint16_t type; + uint32_t count; + uint32_t loc; + size_t i; int have_label = 0; int have_uuid = 0; int have_logvolid = 0; @@ -190,7 +190,7 @@ nsr: anchor: /* read Anchor Volume Descriptor (AVDP), checking block size */ - for (i = 0; i < 5; i++) { + for (i = 0; i < ARRAY_SIZE(pbs); i++) { vd = (struct volume_descriptor *) blkid_probe_get_buffer(pr, 256 * pbs[i], sizeof(*vd)); if (!vd) -- 2.47.3