summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorpaul <paul>2005-03-14 20:19:01 +0000
committerpaul <paul>2005-03-14 20:19:01 +0000
commit55468c86040081320f557b696e509b76ddfd6c83 (patch)
tree3ee726f155f8776d4a220997681d14c0b09addd0 /lib/vty.c
parent909a215508fd42473fcbe4f5292a59404e5473af (diff)
2005-03-14 Paul Jakma <paul.jakma@sun.com>
* (global) update all c files to match the lib/vector.h rename of (struct vector).active to max, and vector_max macro to vector_active. * lib/vector.h: Rename to (struct vector).max to slightly less confusing active, for the number of active slots, distinct from allocated or active-and-not-empty. Rename vector_max to vector_active for same reason.
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 89a941ca..eca1523c 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -975,7 +975,7 @@ vty_describe_command (struct vty *vty)
/* Get width of command string. */
width = 0;
- for (i = 0; i < vector_max (describe); i++)
+ for (i = 0; i < vector_active (describe); i++)
if ((desc = vector_slot (describe, i)) != NULL)
{
unsigned int len;
@@ -995,7 +995,7 @@ vty_describe_command (struct vty *vty)
desc_width = vty->width - (width + 6);
/* Print out description. */
- for (i = 0; i < vector_max (describe); i++)
+ for (i = 0; i < vector_active (describe); i++)
if ((desc = vector_slot (describe, i)) != NULL)
{
if (desc->cmd[0] == '\0')
@@ -2371,7 +2371,7 @@ vty_log (const char *level, const char *proto_str,
unsigned int i;
struct vty *vty;
- for (i = 0; i < vector_max (vtyvec); i++)
+ for (i = 0; i < vector_active (vtyvec); i++)
if ((vty = vector_slot (vtyvec, i)) != NULL)
if (vty->monitor)
{
@@ -2394,7 +2394,7 @@ vty_log_fixed (const char *buf, size_t len)
iov[1].iov_base = "\r\n";
iov[1].iov_len = 2;
- for (i = 0; i < vector_max (vtyvec); i++)
+ for (i = 0; i < vector_active (vtyvec); i++)
{
struct vty *vty;
if (((vty = vector_slot (vtyvec, i)) != NULL) && vty->monitor)
@@ -2490,7 +2490,7 @@ DEFUN (config_who,
unsigned int i;
struct vty *v;
- for (i = 0; i < vector_max (vtyvec); i++)
+ for (i = 0; i < vector_active (vtyvec); i++)
if ((v = vector_slot (vtyvec, i)) != NULL)
vty_out (vty, "%svty[%d] connected from %s.%s",
v->config ? "*" : " ",
@@ -2771,7 +2771,7 @@ vty_reset ()
struct vty *vty;
struct thread *vty_serv_thread;
- for (i = 0; i < vector_max (vtyvec); i++)
+ for (i = 0; i < vector_active (vtyvec); i++)
if ((vty = vector_slot (vtyvec, i)) != NULL)
{
buffer_reset (vty->obuf);
@@ -2779,7 +2779,7 @@ vty_reset ()
vty_close (vty);
}
- for (i = 0; i < vector_max (Vvty_serv_thread); i++)
+ for (i = 0; i < vector_active (Vvty_serv_thread); i++)
if ((vty_serv_thread = vector_slot (Vvty_serv_thread, i)) != NULL)
{
thread_cancel (vty_serv_thread);