[newlib-cygwin/topic/posix_acl_funcs] Change if_nameindex() to use unsigned int i variable.

Corinna Vinschen corinna@sourceware.org
Mon Feb 8 14:54:00 GMT 2016


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c2a27453c6e6e506e75795954b8dda12a225f9cd

commit c2a27453c6e6e506e75795954b8dda12a225f9cd
Author: Jeff Johnston <jjohnstn@redhat.com>
Date:   Thu Feb 4 13:30:14 2016 -0500

    Change if_nameindex() to use unsigned int i variable.
    
    - i variable used in loop that shifts to right so use
      unsigned int instead

Diff:
---
 newlib/libc/sys/linux/net/ifname.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/sys/linux/net/ifname.c b/newlib/libc/sys/linux/net/ifname.c
index b7975bc..d2609b1 100644
--- a/newlib/libc/sys/linux/net/ifname.c
+++ b/newlib/libc/sys/linux/net/ifname.c
@@ -125,7 +125,8 @@ struct if_nameindex *
 if_nameindex()
 {
 	size_t needed;
-	int mib[6], i, ifn = 0, off = 0, hlen;
+	int mib[6], ifn = 0, off = 0, hlen;
+	unsigned int i;
 	char *buf = NULL, *lim, *next, *cp, *ifbuf = NULL;
 	struct rt_msghdr *rtm;
 	struct if_msghdr *ifm;



More information about the Newlib-cvs mailing list