lib: Fix duplicate variable name in smux.c and vty.c
Both smux.c and vty.c have the same:
static struct thread_master *master;
as global variables for the file. This can and will lead to confusion
name the variables something appropriate for the file it is in.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/lib/smux.c b/lib/smux.c
index 70be492..03da99f 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -113,7 +113,7 @@
};
/* thread master */
-static struct thread_master *master;
+static struct thread_master *smux_master;
static int
oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
@@ -1239,13 +1239,13 @@
switch (event)
{
case SMUX_SCHEDULE:
- smux_connect_thread = thread_add_event (master, smux_connect, NULL, 0);
+ smux_connect_thread = thread_add_event (smux_master, smux_connect, NULL, 0);
break;
case SMUX_CONNECT:
- smux_connect_thread = thread_add_timer (master, smux_connect, NULL, 10);
+ smux_connect_thread = thread_add_timer (smux_master, smux_connect, NULL, 10);
break;
case SMUX_READ:
- smux_read_thread = thread_add_read (master, smux_read, NULL, sock);
+ smux_read_thread = thread_add_read (smux_master, smux_read, NULL, sock);
break;
default:
break;
@@ -1474,7 +1474,7 @@
smux_init (struct thread_master *tm)
{
/* copy callers thread master */
- master = tm;
+ smux_master = tm;
/* Make MIB tree. */
treelist = list_new();