[U-Boot] [PATCH v2] display_buffer: fix misaligned buffer

Mike Frysinger vapier at gentoo.org
Wed Sep 8 06:20:14 CEST 2010


On Tuesday, September 07, 2010 19:33:38 Wolfgang Denk wrote:
> Reinhard Meyer wrote:
> >  		for (i = 0; i < linelen * width; i++)
> > 
> > -			if (!isprint(ucp[i]) || ucp[i] >= 0x80)
> > -				ucp[i] = '.';
> > -		ucp[i] = '\0';
> > -		printf("    %s\n", ucp);
> > +			if (!isprint(lb.uc[i]) || lb.uc[i] >= 0x80)
> > +				lb.uc[i] = '.';
> 
> Please fix this old bug: the multi-line statement needs braces.

which bug ?  the logic is:
	for (...)
		if (...)
			... = ...;

you want the for loop to have explicit braces ?
	for (...) {
		if (...)
			... = ...;
	}

which would make it a style "bug", and not a code bug
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100908/3fe215e0/attachment.pgp 


More information about the U-Boot mailing list