Re: [PATCH]sbin/route WARNS=6 cleanup, Style(9), small bug fix

看板DFBSD_submit作者時間21年前 (2005/03/06 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
Thanks, but two things: 1) Same problem with line-wrapping as before. Please send as a MIME attachment instead. 2) Seperate patches for bugfixes and style fixes are preferred. Style and WARNS=6 can sometimes be combined, but use your own discretion. The basic questions to ask yourself are, "is it clear what this patch changes? is it easy to review?" If in doubt, make seperate patches; it's a lot easier on the committer :) -Chris On Sat, 05 Mar 2005 12:23:40 +0800 "Sepherosa Ziehau" <sepherosa@softhome.net> wrote: > small bug fixed: > at the end of route.c:netname(): > ... > u_short *s = (u_short *)sa->sa_data; > u_short *slim = s + ((sa->sa_len + 1)>>1); > ... > while (s < slim && cp < cpe) > cp += snprintf(cp, cpe - cp, " %x", *s++); > ... > > this will cause `s' point to the mem-location which does not belong to > > `sa'. > > patch: > > Index: Makefile > =================================================================== > RCS file: /opt/df_cvs/src/sbin/route/Makefile,v > retrieving revision 1.4 > diff -u -r1.4 Makefile > --- Makefile 24 Mar 2004 07:04:28 -0000 1.4 > +++ Makefile 5 Mar 2005 04:12:05 -0000 > @@ -2,15 +2,17 @@ > # $FreeBSD: src/sbin/route/Makefile,v 1.11.2.3 2002/12/04 14:05:42 > # ru Exp > $ > [...]
文章代碼(AID): #12AXT900 (DFBSD_submit)
文章代碼(AID): #12AXT900 (DFBSD_submit)