summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclAppInit.c7
-rw-r--r--unix/tclSelectNotfy.c4
-rw-r--r--unix/tclUnixFCmd.c17
-rw-r--r--unix/tclUnixFile.c4
-rw-r--r--unix/tclUnixInit.c43
-rw-r--r--unix/tclUnixPipe.c9
6 files changed, 41 insertions, 43 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index c49df55..6158c99 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -164,10 +164,9 @@ Tcl_AppInit(
#define INITFILENAME ".tclshrc"
#endif
- (void)Tcl_EvalEx(interp,
- "set tcl_rcFileName [file tildeexpand ~/" INITFILENAME "]",
- -1,
- TCL_EVAL_GLOBAL);
+ (void) Tcl_EvalEx(interp,
+ "set tcl_rcFileName [file tildeexpand ~/" INITFILENAME "]",
+ -1, TCL_EVAL_GLOBAL);
return TCL_OK;
}
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index feabfa8..252c493 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -1115,12 +1115,12 @@ NotifierThreadProc(
tspecPtr->tv_nsec = timePtr->tv_usec * 1000;
}
ret = pselect(numFdBits, &readableMask, &writableMask,
- &exceptionMask, tspecPtr, &notifierSigMask);
+ &exceptionMask, tspecPtr, &notifierSigMask);
}
#else
pthread_sigmask(SIG_SETMASK, &notifierSigMask, NULL);
ret = select(numFdBits, &readableMask, &writableMask, &exceptionMask,
- timePtr);
+ timePtr);
pthread_sigmask(SIG_BLOCK, &allSigMask, NULL);
#endif
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 3eee59e..08b9d27 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -484,8 +484,7 @@ DoCopyFile(
char linkBuf[MAXPATHLEN+1];
int length;
- length = readlink(src, linkBuf, MAXPATHLEN);
- /* INTL: Native. */
+ length = readlink(src, linkBuf, MAXPATHLEN); /* INTL: Native. */
if (length == -1) {
return TCL_ERROR;
}
@@ -1786,7 +1785,7 @@ GetModeFromPermString(
newMode = 0;
for (i = 0; i < 9; i++) {
- switch (*(modeStringPtr+i)) {
+ switch (modeStringPtr[i]) {
case 'r':
if ((i%3) != 0) {
goto chmodStyleCheck;
@@ -1848,13 +1847,13 @@ GetModeFromPermString(
* We now check for an "ugoa+-=rwxst" style permissions string
*/
- for (n = 0 ; *(modeStringPtr+n) != '\0' ; n = n + i) {
+ for (n = 0 ; modeStringPtr[n] != '\0' ; n += i) {
oldMode = *modePtr;
who = op = what = op_found = who_found = 0;
- for (i = 0 ; *(modeStringPtr+n+i) != '\0' ; i++ ) {
+ for (i = 0 ; modeStringPtr[n + i] != '\0' ; i++ ) {
if (!who_found) {
/* who */
- switch (*(modeStringPtr+n+i)) {
+ switch (modeStringPtr[n + i]) {
case 'u':
who |= 0x9C0;
continue;
@@ -1875,7 +1874,7 @@ GetModeFromPermString(
}
if (!op_found) {
/* op */
- switch (*(modeStringPtr+n+i)) {
+ switch (modeStringPtr[n + i]) {
case '+':
op = 1;
op_found = 1;
@@ -1893,7 +1892,7 @@ GetModeFromPermString(
}
}
/* what */
- switch (*(modeStringPtr+n+i)) {
+ switch (modeStringPtr[n + i]) {
case 'r':
what |= 0x124;
continue;
@@ -1914,7 +1913,7 @@ GetModeFromPermString(
default:
return TCL_ERROR;
}
- if (*(modeStringPtr+n+i) == ',') {
+ if (modeStringPtr[n + i] == ',') {
i++;
break;
}
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 70924f8..444c73f 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -131,9 +131,9 @@ TclpFindExecutable(
&& S_ISREG(statBuf.st_mode)) {
goto gotName;
}
- if (*p == '\0') {
+ if (p[0] == '\0') {
break;
- } else if (*(p+1) == 0) {
+ } else if (p[1] == 0) {
p = "./";
} else {
p++;
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index eb8fa4c..67bff10 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -53,31 +53,31 @@ static const char *const processors[NUMPROCESSORS] = {
};
typedef struct {
- union {
- unsigned int dwOemId;
- struct {
- int wProcessorArchitecture;
- int wReserved;
+ union {
+ unsigned int dwOemId;
+ struct {
+ int wProcessorArchitecture;
+ int wReserved;
+ };
};
- };
- unsigned int dwPageSize;
- void *lpMinimumApplicationAddress;
- void *lpMaximumApplicationAddress;
- void *dwActiveProcessorMask;
- unsigned int dwNumberOfProcessors;
- unsigned int dwProcessorType;
- unsigned int dwAllocationGranularity;
- int wProcessorLevel;
- int wProcessorRevision;
+ unsigned int dwPageSize;
+ void *lpMinimumApplicationAddress;
+ void *lpMaximumApplicationAddress;
+ void *dwActiveProcessorMask;
+ unsigned int dwNumberOfProcessors;
+ unsigned int dwProcessorType;
+ unsigned int dwAllocationGranularity;
+ int wProcessorLevel;
+ int wProcessorRevision;
} SYSTEM_INFO;
typedef struct {
- unsigned int dwOSVersionInfoSize;
- unsigned int dwMajorVersion;
- unsigned int dwMinorVersion;
- unsigned int dwBuildNumber;
- unsigned int dwPlatformId;
- wchar_t szCSDVersion[128];
+ unsigned int dwOSVersionInfoSize;
+ unsigned int dwMajorVersion;
+ unsigned int dwMinorVersion;
+ unsigned int dwBuildNumber;
+ unsigned int dwPlatformId;
+ wchar_t szCSDVersion[128];
} OSVERSIONINFOW;
#endif
@@ -864,6 +864,7 @@ TclpSetVariables(
/* Some platforms build configure scripts expect ~ expansion so do that */
Tcl_Obj *origPaths;
Tcl_Obj *resolvedPaths;
+
origPaths = Tcl_GetVar2Ex(interp, "tcl_pkgPath", NULL, TCL_GLOBAL_ONLY);
resolvedPaths = TclResolveTildePathList(origPaths);
if (resolvedPaths != origPaths && resolvedPaths != NULL) {
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 64dd8baf..939ec85 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -524,12 +524,11 @@ TclpCreateProcess(
sigdelset(&sigs, SIGKILL);
sigdelset(&sigs, SIGSTOP);
- posix_spawnattr_setflags(&attr,
- POSIX_SPAWN_SETSIGDEF
+ posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGDEF
#ifdef POSIX_SPAWN_USEVFORK
- | POSIX_SPAWN_USEVFORK
+ | POSIX_SPAWN_USEVFORK
#endif
- );
+ );
posix_spawnattr_setsigdefault(&attr, &sigs);
posix_spawn_file_actions_adddup2(&actions, GetFd(inputFile), 0);
@@ -537,7 +536,7 @@ TclpCreateProcess(
posix_spawn_file_actions_adddup2(&actions, GetFd(errorFile), 2);
status = posix_spawnp(&pid, newArgv[0], &actions, &attr,
- newArgv, environ);
+ newArgv, environ);
childErrno = errno;
posix_spawn_file_actions_destroy(&actions);
posix_spawnattr_destroy(&attr);