Avoid "bool" variable name
C23 has a type of that name.
This commit is contained in:
@@ -591,7 +591,7 @@ assert(int p)
|
||||
return(p);
|
||||
}
|
||||
|
||||
typedef struct {caddr_t max; int i; boolean_t bool;} Rec;
|
||||
typedef struct {caddr_t max; int i; boolean_t b;} Rec;
|
||||
|
||||
static void
|
||||
check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
||||
@@ -602,14 +602,14 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
||||
if (x == z) {
|
||||
rec->max = max;
|
||||
rec->i = 0;
|
||||
rec->bool = B_FALSE;
|
||||
rec->b = B_FALSE;
|
||||
return;
|
||||
}
|
||||
check1(x->llink, max, z, localp, private);
|
||||
if (private->status == rb_badtable) return;
|
||||
max = localp->max;
|
||||
dl = localp->i;
|
||||
redchild = localp->bool;
|
||||
redchild = localp->b;
|
||||
if (!assert (!(redchild && (x->color == red)))) {
|
||||
private->status = rb_badtable;
|
||||
return;
|
||||
@@ -624,7 +624,7 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
||||
if (private->status == rb_badtable) return;
|
||||
max = localp->max;
|
||||
dr = localp->i;
|
||||
redchild = localp->bool;
|
||||
redchild = localp->b;
|
||||
if (!assert (!(redchild && (x->color == red)))) {
|
||||
private->status = rb_badtable;
|
||||
return;
|
||||
@@ -635,7 +635,7 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
||||
}
|
||||
rec->max = max;
|
||||
rec->i = dl + ((x->color == black) ? 1 : 0);
|
||||
rec->bool = ((x->color == red) ? B_TRUE : B_FALSE);
|
||||
rec->b = ((x->color == red) ? B_TRUE : B_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
@@ -172,8 +173,6 @@
|
||||
#define ACTION_MASK 0xf0
|
||||
|
||||
|
||||
typedef short bool;
|
||||
|
||||
/* operation states */
|
||||
typedef enum {
|
||||
State_None = 0,
|
||||
|
||||
Reference in New Issue
Block a user