xmlwf/readfilemap.c: Address -Wsign-compare warning

read:
http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
This commit is contained in:
Sebastian Pipping 2017-06-27 23:23:03 +02:00
parent e4f71eeaa0
commit 85bc1329dd

View file

@ -40,7 +40,7 @@ filemap(const char *name,
{
size_t nbytes;
int fd;
int n;
ssize_t n;
struct stat sb;
void *p;
@ -85,7 +85,7 @@ filemap(const char *name,
close(fd);
return 0;
}
if (n != nbytes) {
if (n != (ssize_t)nbytes) {
fprintf(stderr, "%s: read unexpected number of bytes\n", name);
free(p);
close(fd);