From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 30 Dec 2014 14:34:47 +0100 Subject: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls In-Reply-To: <1418735363-5851-1-git-send-email-marex@denx.de> References: <1418735363-5851-1-git-send-email-marex@denx.de> Message-ID: <54A2A9F7.7000007@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 16/12/2014 14:09, Marek Vasut wrote: > The malloc() calls are unnecessary, just allocate the stuff on stack. > While at it, reorder the code a little, so that only one variable is > used for the text, use snprintf() instead of sprintf() and use %01d > as a formatting string to avoid any possible overflows. > > Signed-off-by: Marek Vasut > Cc: Igor Grinberg > Cc: Nikita Kiryanov > Cc: Sean Cross > Cc: Simon Glass > Cc: Stefano Babic > Cc: Tim Harvey > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================