Change in osmo-mgw[master]: libosmo-mgcp: fix unsigned compared against 0 in mgcp_trunk_by_name()

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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jul 7 07:05:09 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19168 )


Change subject: libosmo-mgcp: fix unsigned compared against 0 in mgcp_trunk_by_name()
......................................................................

libosmo-mgcp: fix unsigned compared against 0 in mgcp_trunk_by_name()

e1_trunk_nr_from_epname() returns a signed integer:

  int e1_trunk_nr_from_epname(const char *epname);

mgcp_trunk_by_num() accepts a signed integer:

  struct mgcp_trunk *mgcp_trunk_by_num(const struct mgcp_config *cfg, int index);

Change-Id: Id333a6ddcefd37d82d19f9378ab87d1c02ffd7e3
Closes: CID#211333
---
M src/libosmo-mgcp/mgcp_trunk.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/68/19168/1

diff --git a/src/libosmo-mgcp/mgcp_trunk.c b/src/libosmo-mgcp/mgcp_trunk.c
index cc6637b..4f60cc9 100644
--- a/src/libosmo-mgcp/mgcp_trunk.c
+++ b/src/libosmo-mgcp/mgcp_trunk.c
@@ -147,7 +147,7 @@
 {
 	size_t prefix_len;
 	char epname_lc[MGCP_ENDPOINT_MAXLEN];
-	unsigned long int trunk_nr;
+	int trunk_nr;
 
 	osmo_str_tolower_buf(epname_lc, sizeof(epname_lc), epname);
 	epname = epname_lc;

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Id333a6ddcefd37d82d19f9378ab87d1c02ffd7e3
Gerrit-Change-Number: 19168
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200707/ac64ebab/attachment.htm>


More information about the gerrit-log mailing list