From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Tue, 23 Feb 2010 23:51:23 +0100 Subject: [U-Boot] [PATCH v2] cmd_mtdparts.c: prevent printbuffer overflows In-Reply-To: <201002231624.12172.sr@denx.de> References: <1266938310-32582-1-git-send-email-agust@denx.de> <201002231624.12172.sr@denx.de> Message-ID: <20100223235123.3a8a9608@wker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, Stefan Roese wrote: > > - printf("mtdparts: %s\n", > > - mtdparts_default ? mtdparts_default : "none"); > > + puts("mtdparts: "); > > + puts(mtdparts_default ? mtdparts_default : "none"); > > + puts("\n"); > > It might make sense to add a comment here, describing why you use these puts() > calls instead of one printf(). Otherwise somebody else might trip into this > problem again in a later time. This makes sense. I'll add a comment in next patch version. Best regards, Anatolij