diff options
Diffstat (limited to 'isisd/isis_misc.c')
| -rw-r--r-- | isisd/isis_misc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 27d06e8da7..3aedd8ba1f 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -190,7 +190,7 @@ const char *nlpid2str(uint8_t nlpid) case NLPID_ESIS: return "ES-IS"; default: - snprintf(buf, sizeof(buf), "%" PRIu8, nlpid); + snprintf(buf, sizeof(buf), "%hhu", nlpid); return buf; } } @@ -437,15 +437,18 @@ 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(const uint8_t *sysid) +const char *print_sys_hostname(uint8_t *sysid) { struct isis_dynhn *dyn; + struct isis *isis = NULL; if (!sysid) return "nullsysid"; /* For our system ID return our host name */ - if (memcmp(sysid, isis->sysid, ISIS_SYS_ID_LEN) == 0) + isis = isis_lookup_by_sysid(sysid); + + if (isis != NULL) return cmd_hostname_get(); dyn = dynhn_find_by_id(sysid); |
