Change in libosmocore[master]: gprs_ns2_vty: use strcmp() instead of strncmp()

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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Feb 12 09:37:52 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22871 )

Change subject: gprs_ns2_vty: use strcmp() instead of strncmp()
......................................................................

gprs_ns2_vty: use strcmp() instead of strncmp()

Otherwise substring wouldn't be detected.
E.g. local vs local2

Change-Id: I183b5176a1d8a295b7551ad186b3565adeb3d5e7
---
M src/gb/gprs_ns2_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 55f88b1..0a0a5d3 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -102,7 +102,7 @@
 {
 	struct vty_bind *vbind;
 	llist_for_each_entry(vbind, &binds, list) {
-		if (!strncmp(vbind->name, name, strlen(vbind->name)))
+		if (!strcmp(vbind->name, name))
 			return vbind;
 	}
 	return NULL;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22871
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I183b5176a1d8a295b7551ad186b3565adeb3d5e7
Gerrit-Change-Number: 22871
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210212/82e3abf3/attachment.htm>


More information about the gerrit-log mailing list