Skip to content

Commit

Permalink
Merge pull request #3157 from yebblies/off_t
Browse files Browse the repository at this point in the history
[DDMD] Explicitly cast off_t to size_t
  • Loading branch information
WalterBright committed Jan 26, 2014
2 parents 01ca07b + 57e1395 commit edc0125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/root/file.c
Expand Up @@ -86,7 +86,7 @@ int File::read()
if (len)
return 0; // already read the file
#if POSIX
off_t size;
size_t size;
ssize_t numread;
int fd;
struct stat buf;
Expand All @@ -112,7 +112,7 @@ int File::read()
printf("\tfstat error, errno = %d\n",errno);
goto err2;
}
size = buf.st_size;
size = (size_t)buf.st_size;
buffer = (unsigned char *) ::malloc(size + 2);
if (!buffer)
{
Expand Down

0 comments on commit edc0125

Please sign in to comment.