From: Pali Rohár Date: Wed, 5 Jul 2017 11:46:12 +0000 (+0200) Subject: libblkid: udf: Fix types X-Git-Tag: v2.31-rc1~211^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35b1ec3c4be3ef5c38b30d10c63237fa5220c276;p=thirdparty%2Futil-linux.git libblkid: udf: Fix types --- 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)