diff options
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -57,16 +57,12 @@ struct if_master * devpty0, de0 < del0 */ int -if_cmp_func (struct interface *ifp1, struct interface *ifp2) +if_cmp_name_func (char *p1, char *p2) { unsigned int l1, l2; long int x1, x2; - char *p1, *p2; int res; - p1 = ifp1->name; - p2 = ifp2->name; - while (*p1 && *p2) { /* look up to any number */ l1 = strcspn(p1, "0123456789"); @@ -113,6 +109,12 @@ if_cmp_func (struct interface *ifp1, struct interface *ifp2) return 0; } +static int +if_cmp_func (struct interface *ifp1, struct interface *ifp2) +{ + return if_cmp_name_func (ifp1->name, ifp2->name); +} + /* Create new interface structure. */ struct interface * if_create_vrf (const char *name, int namelen, vrf_id_t vrf_id) |
