summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-05-18 03:35:38 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-05-23 22:52:01 +0200
commit90cf59eccfd41846fc0fa03a6d5a010a91b46b86 (patch)
tree870aca85c70e3d73dd2cca8162be4ac301e22ff5 /vtysh
parentMerge pull request #4385 from manuhalo/fix_deprecate_retain (diff)
downloadfrr-90cf59eccfd41846fc0fa03a6d5a010a91b46b86.tar.xz
frr-90cf59eccfd41846fc0fa03a6d5a010a91b46b86.zip
lib: replace begins_with, add frrstr_endswith
* Change 'begins_with' to 'frrstr_startswith' for consistency * Add suffix checker, frrstr_endswith() * Update vtysh to use the new function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index f1a5eca74..a0b119c3e 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -3347,7 +3347,7 @@ static void vtysh_update_all_instances(struct vtysh_client *head_client)
dir = opendir(vtydir);
if (dir) {
while ((file = readdir(dir)) != NULL) {
- if (begins_with(file->d_name, "ospfd-")
+ if (frrstr_startswith(file->d_name, "ospfd-")
&& ends_with(file->d_name, ".vty")) {
if (n == MAXIMUM_INSTANCES) {
fprintf(stderr,