summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/regexec.c15
-rw-r--r--generic/tclClock.c4
-rw-r--r--generic/tclCmdMZ.c2
-rw-r--r--generic/tclUtf.c3
-rw-r--r--win/tclWinDde.c4
-rw-r--r--win/tclWinLoad.c5
6 files changed, 18 insertions, 15 deletions
diff --git a/generic/regexec.c b/generic/regexec.c
index d0d5680..0ab3c88 100644
--- a/generic/regexec.c
+++ b/generic/regexec.c
@@ -237,10 +237,11 @@ exec(
v->err = 0;
assert(v->g->ntree >= 0);
n = (size_t) v->g->ntree;
- if (n <= LOCALDFAS)
+ if (n <= LOCALDFAS) {
v->subdfas = subdfas;
- else
+ } else {
v->subdfas = (struct dfa **) MALLOC(n * sizeof(struct dfa *));
+ }
if (v->subdfas == NULL) {
if (v->pmatch != pmatch && v->pmatch != mat)
FREE(v->pmatch);
@@ -641,10 +642,11 @@ cdissect(
break;
case '.': /* concatenation */
assert(t->left != NULL && t->right != NULL);
- if (t->left->flags & SHORTER) /* reverse scan */
+ if (t->left->flags & SHORTER) {/* reverse scan */
er = crevcondissect(v, t, begin, end);
- else
+ } else {
er = ccondissect(v, t, begin, end);
+ }
break;
case '|': /* alternation */
assert(t->left != NULL);
@@ -652,10 +654,11 @@ cdissect(
break;
case '*': /* iteration */
assert(t->left != NULL);
- if (t->left->flags & SHORTER) /* reverse scan */
+ if (t->left->flags & SHORTER) {/* reverse scan */
er = creviterdissect(v, t, begin, end);
- else
+ } else {
er = citerdissect(v, t, begin, end);
+ }
break;
case '(': /* capturing */
assert(t->left != NULL && t->right == NULL);
diff --git a/generic/tclClock.c b/generic/tclClock.c
index ca1df44..13a5c65 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -1520,9 +1520,9 @@ GetJulianDayFromEraYearMonthDay(
* Have to make sure quotient is truncated towards 0 when negative.
* See above bug for details. The casts are necessary.
*/
- if (ym1 >= 0)
+ if (ym1 >= 0) {
ym1o4 = ym1 / 4;
- else {
+ } else {
ym1o4 = - (int) (((unsigned int) -ym1) / 4);
}
#endif
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index c94abbd..3ff9947 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -2845,7 +2845,7 @@ TclStringCmp(
if (checkEq && (s1len != s2len)) {
match = 1; /* This will be reversed below. */
- } else {
+ } else {
/*
* The comparison function should compare up to the minimum byte
* length only.
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index bcae055..8931b39 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -448,8 +448,7 @@ Tcl_UtfToUniChar(
* A three-byte-character lead-byte not followed by two trail-bytes
* represents itself.
*/
- }
- else if (byte < 0xF5) {
+ } else if (byte < 0xF5) {
if (((src[1] & 0xC0) == 0x80) && ((src[2] & 0xC0) == 0x80)) {
/*
* Four-byte-character lead byte followed by at least two trail bytes.
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 2570954..1c10c65 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -1789,9 +1789,9 @@ DdeObjCmd(
}
if (result == TCL_OK) {
- if (objc == 1)
+ if (objc == 1) {
objPtr = objv[0];
- else {
+ } else {
objPtr = Tcl_ConcatObj(objc, objv);
}
if (riPtr->handlerPtr != NULL) {
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 1d64d18..9d2d87e 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -112,10 +112,11 @@ TclpDlopen(
* first error for reporting purposes.
*/
if (firstError == ERROR_MOD_NOT_FOUND ||
- firstError == ERROR_DLL_NOT_FOUND)
+ firstError == ERROR_DLL_NOT_FOUND) {
lastError = GetLastError();
- else
+ } else {
lastError = firstError;
+ }
errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ",
Tcl_GetString(pathPtr));