AMD64 - Fix compiler warning.
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 21 Aug 2009 10:42:19 +0000 (03:42 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 21 Aug 2009 10:42:19 +0000 (03:42 -0700)
usr.bin/look/look.c

index 09fb0b8..59a9c44 100644 (file)
@@ -134,7 +134,7 @@ main(int argc, char **argv)
        do {
                if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
                        err(2, "%s", file);
-               if (sb.st_size > SIZE_T_MAX)
+               if (sb.st_size > (off_t)SIZE_T_MAX)
                        errx(2, "%s: %s", file, strerror(EFBIG));
                if ((front = mmap(NULL, (size_t)sb.st_size, PROT_READ, MAP_SHARED, fd, (off_t)0)) == MAP_FAILED)
                        err(2, "%s", file);