Author: kientzle Date: Wed Nov 5 06:40:53 2008 New Revision: 184669 URL: http://svn.freebsd.org/changeset/base/184669
Log: When comparing, cast to the larger size, off_t in this case. Once we know which one is smaller, then we cast to the smaller size. Thanks to Xin Li (delphij@) Pointy hat: /me Modified: head/usr.bin/tar/test/main.c Modified: head/usr.bin/tar/test/main.c ============================================================================== --- head/usr.bin/tar/test/main.c Wed Nov 5 05:26:11 2008 (r184668) +++ head/usr.bin/tar/test/main.c Wed Nov 5 06:40:53 2008 (r184669) @@ -494,7 +494,7 @@ test_assert_empty_file(const char *f1fmt if (fd < 0) { fprintf(stderr, " Unable to open %s\n", f1); } else { - s = (sizeof(buff) < (size_t)st.st_size) ? + s = ((off_t)sizeof(buff) < st.st_size) ? (ssize_t)sizeof(buff) : (ssize_t)st.st_size; s = read(fd, buff, s); hexdump(buff, NULL, s, 0); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"