Skip to content

Commit

Permalink
Fixed indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MihirLuthra committed Aug 20, 2019
1 parent 26dff65 commit 77f227a
Show file tree
Hide file tree
Showing 5 changed files with 286 additions and 391 deletions.
27 changes: 14 additions & 13 deletions src/darwintracelib1.0/close.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* will be set to the FD to be closed when closing should be allowed.
*/
static int _dt_close(int fd) {

FILE *stream = __darwintrace_sock();
if (stream) {
int dtsock = fileno(stream);
Expand All @@ -58,18 +58,19 @@ static int _dt_close(int fd) {
return -1;
}
}


if(fd == __dtsharedmemory_getStatusFileFd() || fd == __dtsharedmemory_getSharedMemoryFileFd())
{
//Not resetting fd would causes errors in port autoconf
if(!__dtsharedmemory_reset_fd())
{
errno = EBADF;
return -1;
}
}



if(fd == __dtsharedmemory_getStatusFileFd() || fd == __dtsharedmemory_getSharedMemoryFileFd())
{
//Not resetting fd would causes errors in port autoconf
if(!__dtsharedmemory_reset_fd())
{
fprintf(__darwintrace_stderr, "close.c : Failed to reset fd for dtsm files");
errno = EBADF;
return -1;
}
}

return close(fd);
}

Expand Down
Loading

0 comments on commit 77f227a

Please sign in to comment.