summaryrefslogtreecommitdiffstats
path: root/generic/regcomp.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-05-19 08:23:09 (GMT)
committernijtmans <nijtmans>2010-05-19 08:23:09 (GMT)
commit2bdf96f5608d4e27a76ad4080398df6885a6209a (patch)
tree31dbdbc468a888b7db0ce1c24b08964fe129d83b /generic/regcomp.c
parent0f67d4faac5372c251720b6f818d319392f0b868 (diff)
downloadtcl-2bdf96f5608d4e27a76ad4080398df6885a6209a.zip
tcl-2bdf96f5608d4e27a76ad4080398df6885a6209a.tar.gz
tcl-2bdf96f5608d4e27a76ad4080398df6885a6209a.tar.bz2
Don't use arrays of length 1, just use a single element then, it makes code more readable.
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r--generic/regcomp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 8ff77ad..9753ca4 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -1458,7 +1458,7 @@ brackpart(
celt startc, endc;
struct cvec *cv;
const chr *startp, *endp;
- chr c[1];
+ chr c;
/*
* Parse something, get rid of special cases, take shortcuts.
@@ -1470,7 +1470,7 @@ brackpart(
return;
break;
case PLAIN:
- c[0] = v->nextvalue;
+ c = v->nextvalue;
NEXT();
/*
@@ -1478,10 +1478,10 @@ brackpart(
*/
if (!SEE(RANGE)) {
- onechr(v, c[0], lp, rp);
+ onechr(v, c, lp, rp);
return;
}
- startc = element(v, c, c+1);
+ startc = element(v, &c, &c+1);
NOERR();
break;
case COLLEL:
@@ -1525,9 +1525,9 @@ brackpart(
switch (v->nexttype) {
case PLAIN:
case RANGE:
- c[0] = v->nextvalue;
+ c = v->nextvalue;
NEXT();
- endc = element(v, c, c+1);
+ endc = element(v, &c, &c+1);
NOERR();
break;
case COLLEL: