diff options
Diffstat (limited to 'lib/table.c')
| -rw-r--r-- | lib/table.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/table.c b/lib/table.c index 76062cd10c..bf63609bc3 100644 --- a/lib/table.c +++ b/lib/table.c @@ -142,20 +142,20 @@ static void route_table_free(struct route_table *rt) } /* Utility mask array. */ -static const u_char maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0, - 0xf8, 0xfc, 0xfe, 0xff}; +static const uint8_t maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0, + 0xf8, 0xfc, 0xfe, 0xff}; /* Common prefix route genaration. */ static void route_common(const struct prefix *n, const struct prefix *p, struct prefix *new) { int i; - u_char diff; - u_char mask; + uint8_t diff; + uint8_t mask; - const u_char *np = (const u_char *)&n->u.prefix; - const u_char *pp = (const u_char *)&p->u.prefix; - u_char *newp = (u_char *)&new->u.prefix; + const uint8_t *np = (const uint8_t *)&n->u.prefix; + const uint8_t *pp = (const uint8_t *)&p->u.prefix; + uint8_t *newp = (uint8_t *)&new->u.prefix; for (i = 0; i < p->prefixlen / 8; i++) { if (np[i] == pp[i]) @@ -277,8 +277,8 @@ struct route_node *route_node_get(struct route_table *const table, struct route_node *node; struct route_node *match; struct route_node *inserted; - u_char prefixlen = p->prefixlen; - const u_char *prefix = &p->u.prefix; + uint8_t prefixlen = p->prefixlen; + const uint8_t *prefix = &p->u.prefix; apply_mask((struct prefix *)p); node = hash_get(table->hash, (void *)p, NULL); |
