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.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15805 )
Change subject: vty.c: don't ignore get_string_value() errors
......................................................................
vty.c: don't ignore get_string_value() errors
Change uint8_t sapi to int, so we can properly assert on errors from
get_string_value().
Fixes: CID#205066, CID#205069
Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0
---
M src/common/vty.c
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
fixeria: Looks good to me, approved
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/vty.c b/src/common/vty.c
index 865c236..2e7a66d 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1603,11 +1603,11 @@
DEFUN(logging_fltr_l1_sapi, logging_fltr_l1_sapi_cmd, "HIDDEN", "HIDDEN")
{
- uint8_t sapi = get_string_value(l1sap_common_sapi_names, argv[0]);
+ int sapi = get_string_value(l1sap_common_sapi_names, argv[0]);
struct log_target *tgt = osmo_log_vty2tgt(vty);
uint16_t **sapi_mask;
- OSMO_ASSERT(sapi != -EINVAL);
+ OSMO_ASSERT(sapi < 0);
if (!tgt)
return CMD_WARNING;
@@ -1624,11 +1624,11 @@
DEFUN(no_logging_fltr_l1_sapi, no_logging_fltr_l1_sapi_cmd, "HIDDEN", "HIDDEN")
{
- uint8_t sapi = get_string_value(l1sap_common_sapi_names, argv[0]);
+ int sapi = get_string_value(l1sap_common_sapi_names, argv[0]);
struct log_target *tgt = osmo_log_vty2tgt(vty);
uint16_t *sapi_mask;
- OSMO_ASSERT(sapi != -EINVAL);
+ OSMO_ASSERT(sapi < 0);
if (!tgt)
return CMD_WARNING;
if (!tgt->filter_data[LOG_FLT_L1_SAPI])
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15805
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0
Gerrit-Change-Number: 15805
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191021/5ed646f8/attachment.htm>