fsck: fix wrong check
authorAlan Cox <alan@linux.intel.com>
Sun, 13 Nov 2016 00:09:59 +0000 (00:09 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 13 Nov 2016 00:09:59 +0000 (00:09 +0000)
Applications/util/fsck.c

index 72acab2..5a43173 100644 (file)
@@ -166,7 +166,7 @@ void pass1(void)
         ++icount;
         /* Check size */
 
-        if (swizzle32(ino.i_size) < 0) {
+        if ((int32_t)swizzle32(ino.i_size) < 0) {
             printf("Inode %d offset is negative with value of %ld. Fix? ",
                     n, (long)swizzle32(ino.i_size));
             if (yes()) {