diff options
author | David Lamparter <equinox@diac24.net> | 2020-01-21 15:02:41 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-01-21 16:35:00 +0100 |
commit | b7b3d466eb9dc631753d6ddc0b32d5a7ad1ded8f (patch) | |
tree | eb3c0ee228b1c2444d0364eedabbfc2fdba91e57 /bfdd | |
parent | bfdd: remove logging shim (diff) | |
download | frr-b7b3d466eb9dc631753d6ddc0b32d5a7ad1ded8f.tar.xz frr-b7b3d466eb9dc631753d6ddc0b32d5a7ad1ded8f.zip |
bfdd: fix format strings
... now that we get warnings about them ...
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd_packet.c | 4 | ||||
-rw-r--r-- | bfdd/config.c | 5 | ||||
-rw-r--r-- | bfdd/control.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 6da5e2cdf..1ec761e3b 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -116,7 +116,7 @@ int _ptm_bfd_send(struct bfd_session *bs, uint16_t *port, const void *data, return -1; } if (rv < (ssize_t)datalen) - log_debug("packet-send: send partial", strerror(errno)); + log_debug("packet-send: send partial: %s", strerror(errno)); return 0; } @@ -799,7 +799,7 @@ int bp_udp_send(int sd, uint8_t ttl, uint8_t *data, size_t datalen, log_debug("udp-send: loopback failure: (%d) %s", errno, strerror(errno)); return -1; } else if (wlen < (ssize_t)datalen) { - log_debug("udp-send: partial send: %ld expected %ld", wlen, + log_debug("udp-send: partial send: %zd expected %zu", wlen, datalen); return -1; } diff --git a/bfdd/config.c b/bfdd/config.c index 0c0bac0aa..dd4a19269 100644 --- a/bfdd/config.c +++ b/bfdd/config.c @@ -215,7 +215,8 @@ static int parse_peer_config(struct json_object *jo, struct bfd_peer_cfg *bpc) if (strlcpy(bpc->bpc_localif, sval, sizeof(bpc->bpc_localif)) > sizeof(bpc->bpc_localif)) { - log_debug("\tlocal-interface: %s (truncated)"); + log_debug("\tlocal-interface: %s (truncated)", + sval); error++; } else { log_debug("\tlocal-interface: %s", sval); @@ -235,7 +236,7 @@ static int parse_peer_config(struct json_object *jo, struct bfd_peer_cfg *bpc) bpc->bpc_detectmultiplier = json_object_get_int64(jo_val); bpc->bpc_has_detectmultiplier = true; - log_debug("\tdetect-multiplier: %llu", + log_debug("\tdetect-multiplier: %u", bpc->bpc_detectmultiplier); } else if (strcmp(key, "receive-interval") == 0) { bpc->bpc_recvinterval = json_object_get_int64(jo_val); diff --git a/bfdd/control.c b/bfdd/control.c index 5c5421c04..cf821f45b 100644 --- a/bfdd/control.c +++ b/bfdd/control.c @@ -471,7 +471,7 @@ static int control_read(struct thread *t) bcb->bcb_buf = XMALLOC(MTYPE_BFDD_NOTIFICATION, sizeof(bcm) + bcb->bcb_left + 1); if (bcb->bcb_buf == NULL) { - log_warning("%s: not enough memory for message size: %u", + log_warning("%s: not enough memory for message size: %zu", __func__, bcb->bcb_left); control_free(bcs); return 0; |