int File::seek(MPI_Offset offset, int whence){
switch(whence){
- case(MPI_SEEK_SET):
+ case MPI_SEEK_SET:
XBT_VERB("Seeking in MPI_File %s, setting offset %lld", file_->get_path(), offset);
file_->seek(offset,SEEK_SET);
break;
- case(MPI_SEEK_CUR):
+ case MPI_SEEK_CUR:
XBT_VERB("Seeking in MPI_File %s, current offset + %lld", file_->get_path(), offset);
file_->seek(offset,SEEK_CUR);
break;
- case(MPI_SEEK_END):
+ case MPI_SEEK_END:
XBT_VERB("Seeking in MPI_File %s, end offset + %lld", file_->get_path(), offset);
file_->seek(offset,SEEK_END);
break;
if (fd >= 0) {
if (fstat(fd, &sbuf) < 0)
- return (NULL);
+ return NULL;
else if (sbuf.st_size > 0) {
/* We were given a valid file descriptor on an open file, so try to remap
/* NULL is not a valid baseaddr as we cannot map anything there. C'mon, user. Think! */
if (baseaddr == NULL)
- return (NULL);
+ return NULL;
/* We start off with the malloc descriptor allocated on the stack, until we build it up enough to
* call _mmalloc_mmap_morecore() to allocate the first page of the region and copy it there. Ensure that it is