svn commit: r184205 - in head: . share/man/man9 sys/arm/arm sys/cam/scsi sys/compat/linux sys/contrib/altq/altq sys/contrib/ipfilter/netinet sys/dev/ar sys/dev/ce sys/dev/hwpmc sys/dev/lmc sys/dev/...

Bruce Evans brde at optusnet.com.au
Fri Oct 24 09:52:08 UTC 2008


On Thu, 23 Oct 2008, [utf-8] Dag-Erling Smørgrav wrote:

> Jaakko Heinonen <jh at saunalahti.fi> writes:
>> This change introduces some bad formatting. Many statements would now
>> fit to 80 columns and don't need to be wrapped.
>
> You're right, and I'd appreciate a patch, if you feel like it - but not
> right away, as I'm about to revert the net80211 parts of the commit.
>
>> There are also places with unnecessary white space:
>
> They were already broken, and I didn't want to mix style changes with
> code changes.

Actually, at least the first 6 weren't broken, but were broken by mixing
style changes with the code changes.  The first 1 is:

% Modified: head/sys/contrib/altq/altq/altq_hfsc.c
% ==============================================================================
% --- head/sys/contrib/altq/altq/altq_hfsc.c	Thu Oct 23 15:44:00 2008	(r184204)
% +++ head/sys/contrib/altq/altq/altq_hfsc.c	Thu Oct 23 15:53:51 2008	(r184205)
% ...
% @@ -471,8 +471,7 @@ hfsc_class_create(struct hfsc_if *hif, s
%  #endif /* ALTQ_RED */
% 
%  	if (rsc != NULL && (rsc->m1 != 0 || rsc->m2 != 0)) {
% -		MALLOC(cl->cl_rsc, struct internal_sc *,
% -		    sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
% +		cl->cl_rsc = malloc(		    sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
%  		if (cl->cl_rsc == NULL)
%  			goto err_ret;
%  		sc2isc(rsc, cl->cl_rsc);

Here the sizeof() was perfectly indented, with 2 tabs and then 4 spaces
for a continuation line.  A dumb sed script appears to have been run
over this blindly.  It duplicated the 2 tabs and 4 spaces, which would
have been OK if it didn't also join the lines by removing only the
newline, leaving weird whitespace after "malloc(".

Bruce


More information about the svn-src-all mailing list