From 106d2fd572c18bebe3dc44031c6d5e56e7b9030f Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 1 Aug 2003 00:24:13 +0000 Subject: 2003-08-01 Cougar * lib/if.c: (if_cmp_func) new function, compare interface names in alphabetical order. (if_create) Take name as argument and add interface in sorted order. (if_get_by_name),(interface_cmd) fixup calls to if_create - see above. (if_init) register list comparison function. * lib/if.h: Add comparison function, modify if_create prototype. * lib/zclient.c: Modify call to if_create. * ospfd/ospf_interface.c: (ospf_vl_new) modify call to if_create. change sprintf to snprintf. * zebra/kernel_socket.c: (ifm_read) modify call to if_create. --- lib/zclient.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/zclient.c') diff --git a/lib/zclient.c b/lib/zclient.c index bb7747fa..bba06ee4 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -555,10 +555,7 @@ zebra_interface_add_read (struct stream *s) /* If such interface does not exist, make new one. */ if (! ifp) - { - ifp = if_create (); - strncpy (ifp->name, ifname_tmp, IFNAMSIZ); - } + ifp = if_create (ifname_tmp, INTERFACE_NAMSIZ); /* Read interface's index. */ ifp->ifindex = stream_getl (s); -- cgit v1.2.1