public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] display_buffer: fix misaligned buffer
Date: Wed, 8 Sep 2010 00:20:14 -0400	[thread overview]
Message-ID: <201009080020.15801.vapier@gentoo.org> (raw)
In-Reply-To: <20100907233338.CE0A31506AA@gemini.denx.de>

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 

  parent reply	other threads:[~2010-09-08  4:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31  8:23 [U-Boot] [PATCH v2] display_buffer: fix misaligned buffer Reinhard Meyer
2010-09-07 23:33 ` Wolfgang Denk
2010-09-08  3:43   ` Reinhard Meyer
2010-09-08  7:48     ` Wolfgang Denk
2010-09-08  8:04       ` Reinhard Meyer
2010-09-08 16:22         ` Mike Frysinger
2010-09-08  4:20   ` Mike Frysinger [this message]
2010-09-08  5:43     ` Wolfgang Denk
2010-09-08  7:26       ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009080020.15801.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox