From d32edee60a938c3ffdb227a94e1f3afac0e40177 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 17 Mar 2021 10:57:43 +0100 Subject: passt: Use INET{,6}_ADDRSTRLEN instead of open coded sizeof Signed-off-by: Stefano Brivio --- passt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passt.c b/passt.c index 622ff38..c37b445 100644 --- a/passt.c +++ b/passt.c @@ -498,9 +498,9 @@ void usage(const char *name) */ int main(int argc, char **argv) { - char buf6[3][sizeof("0123:4567:89ab:cdef:0123:4567:89ab:cdef")]; - char buf4[4][sizeof("255.255.255.255")]; struct epoll_event events[EPOLL_EVENTS]; + char buf6[3][INET6_ADDRSTRLEN]; + char buf4[4][INET_ADDRSTRLEN]; struct epoll_event ev = { 0 }; struct timespec last_time; struct ctx c = { 0 }; -- cgit v1.2.3