passt: Use INET{,6}_ADDRSTRLEN instead of open coded sizeof

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-03-17 10:57:43 +01:00
parent f435e38927
commit d32edee60a

View file

@ -498,9 +498,9 @@ void usage(const char *name)
*/ */
int main(int argc, char **argv) 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]; struct epoll_event events[EPOLL_EVENTS];
char buf6[3][INET6_ADDRSTRLEN];
char buf4[4][INET_ADDRSTRLEN];
struct epoll_event ev = { 0 }; struct epoll_event ev = { 0 };
struct timespec last_time; struct timespec last_time;
struct ctx c = { 0 }; struct ctx c = { 0 };