]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: udf: Fix types
authorPali Rohár <pali.rohar@gmail.com>
Wed, 5 Jul 2017 11:46:12 +0000 (13:46 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Wed, 5 Jul 2017 11:46:12 +0000 (13:46 +0200)
libblkid/src/superblocks/udf.c

index 74f3fd85d8be3de284aa5cc45c56537b5ac0b865..0169d720cd4baa29e210091c46665cbe2a7a6d41 100644 (file)
@@ -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)