This is the mail archive of the
newlib-cvs@sourceware.org
mailing list for the newlib project.
[newlib-cygwin/topic/posix_acl_funcs] Change if_nameindex() to use unsigned int i variable.
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: newlib-cvs at sourceware dot org
- Date: 8 Feb 2016 14:54:06 -0000
- Subject: [newlib-cygwin/topic/posix_acl_funcs] Change if_nameindex() to use unsigned int i variable.
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;