forked from Mirror/frr
lib, ospfd, ospf6d: fix logging of pointer addresses
The %p printf format specifier does already print the pointer address with a leading "0x" prefix (indicating a hexadecimal number). There's no need to add that prefix manually. While here, replace explicit function names in log messages by __func__. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
231af0a5d6
commit
461d106dae
|
@ -3880,9 +3880,8 @@ static int zclient_read(struct thread *thread)
|
||||||
length -= ZEBRA_HEADER_SIZE;
|
length -= ZEBRA_HEADER_SIZE;
|
||||||
|
|
||||||
if (zclient_debug)
|
if (zclient_debug)
|
||||||
zlog_debug("zclient 0x%p command %s VRF %u",
|
zlog_debug("zclient %p command %s VRF %u", zclient,
|
||||||
(void *)zclient, zserv_command_string(command),
|
zserv_command_string(command), vrf_id);
|
||||||
vrf_id);
|
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case ZEBRA_CAPABILITIES:
|
case ZEBRA_CAPABILITIES:
|
||||||
|
|
|
@ -623,8 +623,8 @@ void ospf6_lsa_show_internal(struct vty *vty, struct ospf6_lsa *lsa,
|
||||||
vty_out(vty, "Flag: %x \n", lsa->flag);
|
vty_out(vty, "Flag: %x \n", lsa->flag);
|
||||||
vty_out(vty, "Lock: %d \n", lsa->lock);
|
vty_out(vty, "Lock: %d \n", lsa->lock);
|
||||||
vty_out(vty, "ReTx Count: %d\n", lsa->retrans_count);
|
vty_out(vty, "ReTx Count: %d\n", lsa->retrans_count);
|
||||||
vty_out(vty, "Threads: Expire: 0x%p, Refresh: 0x%p \n",
|
vty_out(vty, "Threads: Expire: %p, Refresh: %p\n", lsa->expire,
|
||||||
(void *)lsa->expire, (void *)lsa->refresh);
|
lsa->refresh);
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2670,15 +2670,16 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi,
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) {
|
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) {
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"ospf_lsa_install() Premature Aging lsa 0x%p, seqnum 0x%x",
|
"%s() Premature Aging lsa %p, seqnum 0x%x",
|
||||||
(void *)lsa,
|
__func__, lsa,
|
||||||
ntohl(lsa->data->ls_seqnum));
|
ntohl(lsa->data->ls_seqnum));
|
||||||
ospf_lsa_header_dump(lsa->data);
|
ospf_lsa_header_dump(lsa->data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
|
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"ospf_lsa_install() got an lsa with seq 0x80000000 that was not self originated. Ignoring");
|
"%s() got an lsa with seq 0x80000000 that was not self originated. Ignoring",
|
||||||
|
__func__);
|
||||||
ospf_lsa_header_dump(lsa->data);
|
ospf_lsa_header_dump(lsa->data);
|
||||||
}
|
}
|
||||||
return old;
|
return old;
|
||||||
|
@ -2764,9 +2765,8 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi,
|
||||||
*/
|
*/
|
||||||
if (IS_LSA_MAXAGE(new)) {
|
if (IS_LSA_MAXAGE(new)) {
|
||||||
if (IS_DEBUG_OSPF(lsa, LSA_INSTALL))
|
if (IS_DEBUG_OSPF(lsa, LSA_INSTALL))
|
||||||
zlog_debug("LSA[Type%d:%pI4]: Install LSA 0x%p, MaxAge",
|
zlog_debug("LSA[Type%d:%pI4]: Install LSA %p, MaxAge",
|
||||||
new->data->type, &new->data->id,
|
new->data->type, &new->data->id, lsa);
|
||||||
(void *)lsa);
|
|
||||||
ospf_lsa_maxage(ospf, lsa);
|
ospf_lsa_maxage(ospf, lsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2855,8 +2855,8 @@ static int ospf_maxage_lsa_remover(struct thread *thread)
|
||||||
if (CHECK_FLAG(lsa->flags, OSPF_LSA_PREMATURE_AGE)) {
|
if (CHECK_FLAG(lsa->flags, OSPF_LSA_PREMATURE_AGE)) {
|
||||||
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
|
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"originating new lsa for lsa 0x%p",
|
"originating new lsa for lsa %p",
|
||||||
(void *)lsa);
|
lsa);
|
||||||
ospf_lsa_refresh(ospf, lsa);
|
ospf_lsa_refresh(ospf, lsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue