summaryrefslogtreecommitdiffstats
path: root/src/vty/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty/command.c')
-rw-r--r--src/vty/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index 46c9fa28..a19d5db9 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2331,6 +2331,10 @@ static inline size_t len(const char *str)
return str? strlen(str) : 0;
}
+/*! Make sure the common length of strings a and b is identical, then compare their lengths. I.e., if a
+ * is longer than b, a must start with exactly b, and vice versa.
+ * \returns EINVAL on mismatch, -1 for a < b, 0 for a == b, 1 for a > b.
+ */
static int indent_cmp(const char *a, const char *b)
{
size_t al, bl;