diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2020-08-21 02:44:27 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2020-08-27 01:16:19 +0200 |
commit | 36944791620d1b223dede262948a0afe3dadca1f (patch) | |
tree | 3ecc59dc5cc3202f27c3b6fd9f10555a64e93da6 /isisd/isis_misc.c | |
parent | isisd: reuse adjacency state change hook in the SPF code (diff) | |
download | frr-36944791620d1b223dede262948a0afe3dadca1f.tar.xz frr-36944791620d1b223dede262948a0afe3dadca1f.zip |
isisd: minor cleanup
* Bring back some consts that were removed;
* Replace ALL_LIST_ELEMENTS by ALL_LIST_ELEMENTS_RO whenever
possible;
* Fix some CLI return values;
* Remove some unnecessary initializations.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_misc.c')
-rw-r--r-- | isisd/isis_misc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 3aedd8ba1..27425f24a 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -437,7 +437,7 @@ struct in_addr newprefix2inaddr(uint8_t *prefix_start, uint8_t prefix_masklen) * Returns the dynamic hostname associated with the passed system ID. * If no dynamic hostname found then returns formatted system ID. */ -const char *print_sys_hostname(uint8_t *sysid) +const char *print_sys_hostname(const uint8_t *sysid) { struct isis_dynhn *dyn; struct isis *isis = NULL; @@ -447,8 +447,7 @@ const char *print_sys_hostname(uint8_t *sysid) /* For our system ID return our host name */ isis = isis_lookup_by_sysid(sysid); - - if (isis != NULL) + if (isis) return cmd_hostname_get(); dyn = dynhn_find_by_id(sysid); |