diff options
author | gdt <gdt> | 2004-12-09 14:46:46 +0000 |
---|---|---|
committer | gdt <gdt> | 2004-12-09 14:46:46 +0000 |
commit | c29fdba771810c70d78d87127d3a479e0f72b60e (patch) | |
tree | 75361d6969db5f8796596ccb7dbcae1d6769523e | |
parent | d1db06faa82a331fb6729064290ecbc61a969b88 (diff) |
Add comments with warnings obtained on NetBSD/i386. Both are due to
size_t being used for streams. Perhaps cast to unsigned long before
printf? Surely that's big enough even if size_t could be larger in
theory.
(no changelog, since only comment changes)
-rw-r--r-- | bgpd/bgp_attr.c | 1 | ||||
-rw-r--r-- | bgpd/bgpd.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 44c85850..8ffcfdd0 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1166,6 +1166,7 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size, /* Check remaining length check.*/ if (endp - BGP_INPUT_PNT (peer) < BGP_ATTR_MIN_LEN) { + /* XXX warning: long int format, int arg (arg 5) */ zlog (peer->log, LOG_WARNING, "%s error BGP attribute length %ld is smaller than min len", peer->host, endp - STREAM_PNT (BGP_INPUT (peer))); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 26c44553..bd2f998f 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4122,6 +4122,7 @@ peer_uptime (time_t uptime2, char *buf, size_t len) /* Check buffer length. */ if (len < BGP_UPTIME_LEN) { + /* XXX: warning: long int format, size_t arg (arg 2) */ zlog_warn ("peer_uptime (): buffer shortage %ld", len); /* XXX: should return status instead of buf... */ snprintf (buf, len, "<error> "); |