From: Lukasz Majewski Date: Tue, 10 Sep 2013 13:29:22 +0000 (+0200) Subject: dfu:cosmetic: Fix printf text for buffer overflow condition X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=a7d2c3cdf2608a597845e10a3bcaafb9e016203b;p=u-boot.git dfu:cosmetic: Fix printf text for buffer overflow condition Correct error message if overflow is detected. Change-Id: I8a915c7353d49822c046fbc36241237b370e6c98 Signed-off-by: Lukasz Majewski --- diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index d73d510391..2f1e2afa19 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -153,8 +153,8 @@ int dfu_write(struct dfu_entity *dfu, void *buf, int size, int blk_seq_num) /* we should be in buffer now (if not then size too large) */ if ((dfu->i_buf + size) > dfu->i_buf_end) { - printf("%s: Wrong size! [%d] [%d] - %d\n", - __func__, dfu->i_blk_seq_num, blk_seq_num, size); + error("Buffer overflow! (0x%p + 0x%x > 0x%p)\n", dfu->i_buf, + size, dfu->i_buf_end); return -1; }