summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index dccf86e851..00efb9136e 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -84,11 +84,12 @@ TSRM_API void tsrm_win32_shutdown(void)
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
SHFILEINFO sfi;
- if (mode == 1 /*X_OK*/)
- return access(pathname, 0)==0 &&
- SHGetFileInfo(pathname,0,&sfi,sizeof(SHFILEINFO),SHGFI_EXETYPE)!=0?0:-1;
- else
+ if (mode == 1 /*X_OK*/) {
+ return access(pathname, 0) == 0 &&
+ SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
+ } else {
return access(pathname, mode);
+ }
}
@@ -370,4 +371,4 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
return -1;
}
}
-#endif \ No newline at end of file
+#endif