mirror of https://gerrit.osmocom.org/libosmocore
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)
This commit is contained in:
parent
1261db1505
commit
54f5f4da59
|
@ -287,7 +287,7 @@ DEFUN(cfg_timer, cfg_timer_cmd, "DYNAMIC", "DYNAMIC")
|
|||
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))
|
||||
|
|
Loading…
Reference in New Issue