diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-07 00:38:54 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-07 02:10:52 +0200 |
commit | 3393df5cf1c0ea2e4aaa3e405253cae90070d53c (patch) | |
tree | b135a863de664ec34baab618f3e719687fdaeefc /lib/if.c | |
parent | Merge pull request #4066 from sworleys/Add-NG-Hash-Func (diff) | |
download | frr-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |