[MERGED] openbsc[master]: cosmetic: vty for timers: remove obsolete range check

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Aug 9 10:47:18 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: vty for timers: remove obsolete range check
......................................................................


cosmetic: vty for timers: remove obsolete range check

The VTY parsing already ensures the parameter range being 1..65535, no need to
check the range again.

Change-Id: I1cffa5b01cd5c589f1e42998e32135f1da8c960b
---
M openbsc/src/libbsc/bsc_vty.c
1 file changed, 0 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index bcd78e3..49ff535 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -1551,12 +1551,6 @@
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);	\
 	int value = atoi(argv[0]);				\
 								\
-	if (value < 1 || value > 65535) {			\
-		vty_out(vty, "Timer value %s out of range.%s",	\
-		        argv[0], VTY_NEWLINE);			\
-		return CMD_WARNING;				\
-	}							\
-								\
 	gsmnet->T##number = value;				\
 	return CMD_SUCCESS;					\
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cffa5b01cd5c589f1e42998e32135f1da8c960b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list