From c5593b51dc98715f7f32a919301b5801ebf1a8ce Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 5 Nov 2018 16:03:19 -0500 Subject: warnings: fix code that emits compiler warnings PR-URL: https://github.com/libuv/libuv/pull/2066 Reviewed-By: Ben Noordhuis Reviewed-By: Refael Ackermann --- src/unix/sunos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/unix/sunos.c') diff --git a/src/unix/sunos.c b/src/unix/sunos.c index ec5ecd7d..2552a019 100644 --- a/src/unix/sunos.c +++ b/src/unix/sunos.c @@ -707,13 +707,14 @@ static int uv__set_phys_addr(uv_interface_address_t* address, struct sockaddr_dl* sa_addr; int sockfd; - int i; + size_t i; struct arpreq arpreq; /* This appears to only work as root */ sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); for (i = 0; i < sizeof(address->phys_addr); i++) { + /* Check that all bytes of phys_addr are zero. */ if (address->phys_addr[i] != 0) return 0; } -- cgit v1.2.3