Re: [PATCH] resolve_host: silence compiler warning about discarding const qualifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Nov 2011 20:39:31 -0600
Steve French <smfrench@xxxxxxxxx> wrote:

> Looks fine.
> 
> Reviewed-by: Steve French <sfrench@xxxxxxxxxx>
> 
> Do we care about lines over 80 in length?  (I don't care unless it
> improves readability to fix).
> 

Thanks...I haven't cared so much about 80 char widths in in cifs-utils.
If someone seriously objects we can do a cleanup on this file later.


> On Wed, Nov 23, 2011 at 6:33 AM, Jeff Layton <jlayton@xxxxxxxxx> wrote:
> > ...don't use "ipaddr" here since it's a const pointer.
> >
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx>
> > ---
> >  resolve_host.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> >
> > diff --git a/resolve_host.c b/resolve_host.c
> > index 69859a3..17cbd10 100644
> > --- a/resolve_host.c
> > +++ b/resolve_host.c
> > @@ -70,8 +70,7 @@ int resolve_host(const char *host, char *addrstr)
> >
> >                        if (sin6->sin6_scope_id) {
> >                                len = strnlen(tmpbuf, sizeof(tmpbuf));
> > -                               ipaddr = tmpbuf + len;
> > -                               snprintf(ipaddr, sizeof(tmpbuf) - len, "%%%u",
> > +                               snprintf(tmpbuf + len, sizeof(tmpbuf) - len, "%%%u",
> >                                         sin6->sin6_scope_id);
> >                        }
> >                        break;
> > --
> > 1.7.6.4
> >
> 
> 


-- 
Jeff Layton <jlayton@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux