From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 8 Sep 2010 00:20:14 -0400 Subject: [U-Boot] [PATCH v2] display_buffer: fix misaligned buffer In-Reply-To: <20100907233338.CE0A31506AA@gemini.denx.de> References: <1283243000-25427-1-git-send-email-u-boot@emk-elektronik.de> <20100907233338.CE0A31506AA@gemini.denx.de> Message-ID: <201009080020.15801.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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