randyk 2003/04/19 20:37:45
Modified: src apreq_tables.c
Log:
avoid '=' : left operand must be l-value errors with some compilers
Revision Changes Path
1.14 +20 -7 httpd-apreq-2/src/apreq_tables.c
Index: apreq_tables.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/apreq_tables.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- apreq_tables.c 19 Apr 2003 16:21:31 -0000 1.13
+++ apreq_tables.c 20 Apr 2003 03:37:45 -0000 1.14
@@ -176,7 +176,10 @@
if (pivot[o].tree[!direction] >= 0)
pivot[o].tree[!direction][o].tree[PARENT] = pivot;
- (parent >= 0) ? parent[o].tree[LR(pivot)] : *root = child;
+ if (parent >= 0)
+ parent[o].tree[LR(pivot)] = child;
+ else
+ *root = child;
child[o].tree[PARENT] = parent;
child[o].tree[direction] = pivot;
@@ -256,7 +259,10 @@
if (x[o].tree[RIGHT] >= 0)
x[o].tree[RIGHT][o].tree[PARENT] = idx;
- (parent >= 0) ? parent[o].tree[LR(x)] : *root = idx;
+ if (parent >= 0)
+ parent[o].tree[LR(x)] = idx;
+ else
+ *root = idx;
elt->tree[PARENT] = parent;
elt->tree[RIGHT] = x[o].tree[RIGHT];
@@ -333,7 +339,10 @@
y[o].tree[RIGHT] = idx[o].tree[RIGHT];
y[o].color = idx[o].color;
- (x >= 0) ? x[o].tree[LR(idx)] : *root = y;
+ if (x >= 0)
+ x[o].tree[LR(idx)] = y;
+ else
+ *root = y;
idx[o].tree[PARENT] = -1;
idx[o].tree[LEFT] = -1;
@@ -356,16 +365,20 @@
/* remove y from the parent chain */
x[o].tree[PARENT] = y[o].tree[PARENT];
- (y[o].tree[PARENT] >= 0) ?
- y[o].tree[PARENT][o].tree[LR(y)] : *root = x;
+ if (y[o].tree[PARENT] >= 0)
+ y[o].tree[PARENT][o].tree[LR(y)] = x;
+ else
+ *root = x;
if (y != idx) { /* swap y[o] with idx[o] */
y[o].tree[LEFT] = idx[o].tree[LEFT];
y[o].tree[RIGHT] = idx[o].tree[RIGHT];
y[o].tree[PARENT] = idx[o].tree[PARENT];
- (y[o].tree[PARENT] >= 0) ?
- y[o].tree[PARENT][o].tree[LR(y)] : *root = y;
+ if (y[o].tree[PARENT] >= 0)
+ y[o].tree[PARENT][o].tree[LR(y)] = y;
+ else
+ *root = y;
idx[o].tree[LEFT] = -1;
idx[o].tree[RIGHT] = -1;