chiark / gitweb /
[PATCH] udev_volume_id: volume_id version 032
[elogind.git] / extras / volume_id / volume_id / msdos / msdos.c
index 915c1b29170bddeae7442acea1c3849394967cc0..08124fad2da5b91125c2e4b403e0fc96bef70b73 100644 (file)
@@ -84,7 +84,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off)
        if (buf == NULL)
                return -1;
 
        if (buf == NULL)
                return -1;
 
-       if (strncmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0)
+       if (memcmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0)
                return -1;
 
        /* check flags on all entries for a valid partition table */
                return -1;
 
        /* check flags on all entries for a valid partition table */
@@ -158,7 +158,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off)
 
                part = (struct msdos_partition_entry*) &buf[MSDOS_PARTTABLE_OFFSET];
 
 
                part = (struct msdos_partition_entry*) &buf[MSDOS_PARTTABLE_OFFSET];
 
-               if (strncmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0)
+               if (memcmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0)
                        break;
 
                next = 0;
                        break;
 
                next = 0;