1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Jan Steemann 2014-05-30 12:53:27 +02:00
commit 84ae83c88a
1 changed files with 5 additions and 7 deletions

View File

@ -146,7 +146,7 @@ static int TruncateDatafile (TRI_datafile_t* const datafile, const off_t length)
static int CreateSparseFile (char const* filename,
const TRI_voc_size_t maximalSize) {
off_t offset;
TRI_lseek_t offset;
char zero;
ssize_t res;
int fd;
@ -162,9 +162,9 @@ static int CreateSparseFile (char const* filename,
}
// create sparse file
offset = TRI_LSEEK(fd, maximalSize - 1, SEEK_SET);
offset = TRI_LSEEK(fd, (TRI_lseek_t) (maximalSize - 1), SEEK_SET);
if (offset == (off_t) -1) {
if (offset == (TRI_lseek_t) -1) {
TRI_set_errno(TRI_ERROR_SYS_ERROR);
TRI_CLOSE(fd);
@ -192,7 +192,6 @@ static int CreateSparseFile (char const* filename,
return fd;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief initialises a datafile
////////////////////////////////////////////////////////////////////////////////
@ -266,7 +265,6 @@ static int TruncateAndSealDatafile (TRI_datafile_t* datafile,
int fd;
int res;
size_t maximalSize;
off_t offset;
void* data;
void* mmHandle;
@ -295,9 +293,9 @@ static int TruncateAndSealDatafile (TRI_datafile_t* datafile,
}
// create sparse file
offset = TRI_LSEEK(fd, (TRI_lseek_t) maximalSize - 1, SEEK_SET);
TRI_lseek_t offset = TRI_LSEEK(fd, (TRI_lseek_t) (maximalSize - 1), SEEK_SET);
if (offset == (off_t) -1) {
if (offset == (TRI_lseek_t) -1) {
TRI_set_errno(TRI_ERROR_SYS_ERROR);
TRI_CLOSE(fd);