From 00b5ed3d921f2f39e60ed372809c33b8bce78ad8 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 20 Sep 2017 00:46:03 +0200 Subject: comment: describe indent_cmp() Change-Id: Ia58c16d995f6751bdd69defe8a46665aee163f3d --- src/vty/command.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3