This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Fix undefined int shift
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Michael McConville <mmcco at mykolab dot com>
- Cc: newlib at sourceware dot org
- Date: Thu, 4 Feb 2016 13:32:00 -0500 (EST)
- Subject: Re: Fix undefined int shift
- Authentication-results: sourceware.org; auth=none
- References: <20160203165406 dot GA29363 at thinkpad dot swarthmore dot edu>
Patch committed.
-- Jeff J.
----- Original Message -----
> My analysis here applies:
>
> https://marc.info/?l=openbsd-tech&m=145377854103866&w=2
>
> Thanks for your time,
> Michael
>
>
> 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;
>