[U-Boot] [PATCH v2] cmd_mtdparts.c: prevent printbuffer overflows

Anatolij Gustschin agust at denx.de
Tue Feb 23 23:51:23 CET 2010


Hi Stefan,

Stefan Roese <sr at denx.de> 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


More information about the U-Boot mailing list