Whamcloud - gitweb
Fixed signed vs. unsigned comparison warning in strncmp().
authorTheodore Ts'o <tytso@mit.edu>
Sun, 14 May 2006 21:29:00 +0000 (17:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 14 May 2006 21:29:00 +0000 (17:29 -0400)
It's better to use memcmp() anyway given the code in question.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/ChangeLog
lib/blkid/probe.c

index 98542de..5a4d5ca 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-14  Theodore Tso  <tytso@mit.edu>
+
+       * probe.c (probe_udf): Fix signed vs. unsigned lint warning;
+               better to use memcmp() rather than strncmp() anyway.
+
 2006-04-09  Theodore Ts'o  <tytso@mit.edu>
 
        * blkid_types.h.in, Makefile.in, tst_types.c: Use the asm_types.h
index dcc6a6e..7edccca 100644 (file)
@@ -587,10 +587,10 @@ static int probe_udf(struct blkid_probe *probe,
                   NSR01 for UDF 1.00
                   NSR02 for UDF 1.50
                   NSR03 for UDF 2.00 */
-               if (!strncmp(isosb->vd_id, "NSR0", 4))
+               if (!memcmp(isosb->vd_id, "NSR0", 4))
                        return 0;
                for (m = udf_magic; *m; m++)
-                       if (!strncmp(*m, isosb->vd_id, 5))
+                       if (!memcmp(*m, isosb->vd_id, 5))
                                break;
                if (*m == 0)
                        return 1;