[MERGED] libosmocore[master]: comment: describe indent_cmp()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Sep 21 21:38:59 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: comment: describe indent_cmp()
......................................................................


comment: describe indent_cmp()

Change-Id: Ia58c16d995f6751bdd69defe8a46665aee163f3d
---
M src/vty/command.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/vty/command.c b/src/vty/command.c
index 46c9fa2..a19d5db 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2331,6 +2331,10 @@
 	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;

-- 
To view, visit https://gerrit.osmocom.org/3993
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia58c16d995f6751bdd69defe8a46665aee163f3d
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list