#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.196 2013/11/19 21:01:12 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.197 2014/03/06 16:16:56 christos Exp $")
#endif /* lint */
#include "magic.h"
file_error(ms, errno, "cannot stat `%s'", dbname);
goto error;
}
- if (st.st_size < 8 || st.st_size > SIZE_MAX) {
+ if (st.st_size < 8 || st.st_size > (off_t)SIZE_MAX) {
file_error(ms, 0, "file `%s' is too %s", dbname,
- st.st_size > SIZE_MAX ? "large" : "small");
+ st.st_size < 8 ? "small" : "large");
goto error;
}