| 556 | } |
| 557 | |
| 558 | static int /* XXX: arbitrary ordering for non-contiguous masks */ |
| 559 | rn_lexobetter(void *m_arg, void *n_arg) |
| 560 | { |
| 561 | u_char *mp = m_arg, *np = n_arg, *lim; |
| 562 | |
| 563 | if (LEN(mp) > LEN(np)) |
| 564 | return (1); /* not really, but need to check longer one first */ |
| 565 | if (LEN(mp) == LEN(np)) |
| 566 | for (lim = mp + LEN(mp); mp < lim;) |
| 567 | if (*mp++ > *np++) |
| 568 | return (1); |
| 569 | return (0); |
| 570 | } |
| 571 | |
| 572 | static struct radix_mask * |
| 573 | rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next) |