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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13019
Change subject: vty/tdef_vty.c: drop redundant comparison
......................................................................
vty/tdef_vty.c: drop redundant comparison
The amount of arguments is already being checked a few lines before:
/* If any arguments are missing, redirect to 'show' */
if (argc < 3)
return show_timer(self, vty, argc, argv);
so we cannot reach the expression NULL inside this statement:
group_arg = argc > 0 ? argv[0] : NULL;
Change-Id: Ice59d1a46c2080cd02060e3410706c502db4ce0b
Fixes: CID#190873 Logically dead code (DEADCODE)
---
M src/vty/tdef_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/13019/1
diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c
index 1c6af70..bcf7e67 100644
--- a/src/vty/tdef_vty.c
+++ b/src/vty/tdef_vty.c
@@ -274,7 +274,7 @@
return show_timer(self, vty, argc, argv);
/* If all arguments are passed, this is configuring a timer. */
- group_arg = argc > 0 ? argv[0] : NULL;
+ group_arg = argv[0];
timer_args = argv + 1;
osmo_tdef_groups_for_each(g, global_tdef_groups) {
if (strcmp(g->name, group_arg))
--
To view, visit https://gerrit.osmocom.org/13019
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice59d1a46c2080cd02060e3410706c502db4ce0b
Gerrit-Change-Number: 13019
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190223/84521d34/attachment.htm>