summaryrefslogtreecommitdiffstats
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-07 00:38:54 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-04-07 02:10:52 +0200
commit3393df5cf1c0ea2e4aaa3e405253cae90070d53c (patch)
treeb135a863de664ec34baab618f3e719687fdaeefc /lib/if.c
parentMerge pull request #4066 from sworleys/Add-NG-Hash-Func (diff)
downloadfrr-3393df5cf1c0ea2e4aaa3e405253cae90070d53c.tar.xz
frr-3393df5cf1c0ea2e4aaa3e405253cae90070d53c.zip
lib: Fixup IFF_OUT_LOG macro to make SA happy
The IFF_OUT_LOG macro is using BUFSIZE, which is the sizeof(logbuf) but for some reason 8.0 clang SA is not happy with it. Just make it happy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/if.c b/lib/if.c
index 8945159aa..a31b44c7d 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -519,10 +519,10 @@ const char *if_flag_dump(unsigned long flag)
#define IFF_OUT_LOG(X, STR) \
if (flag & (X)) { \
if (separator) \
- strlcat(logbuf, ",", BUFSIZ); \
+ strlcat(logbuf, ",", sizeof(logbuf)); \
else \
separator = 1; \
- strlcat(logbuf, STR, BUFSIZ); \
+ strlcat(logbuf, STR, sizeof(logbuf)); \
}
strlcpy(logbuf, "<", BUFSIZ);
@@ -548,7 +548,7 @@ const char *if_flag_dump(unsigned long flag)
IFF_OUT_LOG(IFF_IPV4, "IPv4");
IFF_OUT_LOG(IFF_IPV6, "IPv6");
- strlcat(logbuf, ">", BUFSIZ);
+ strlcat(logbuf, ">", sizeof(logbuf));
return logbuf;
#undef IFF_OUT_LOG