This eliminates an illegal and annoying warning.

'rom' is the current read pointer.
'rom_end' points to last valid byte of the stream. 

Signed-off-by: Roman Kononov <kononov195-lbl@yahoo.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2547 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Roman Kononov 2007-02-03 10:43:48 +00:00 committed by Stefan Reinauer
parent 958a1f308a
commit de7f81f48a
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ byte_offset_t stream_skip(byte_offset_t count)
{ {
byte_offset_t bytes; byte_offset_t bytes;
bytes = count; bytes = count;
if ((rom + bytes) > rom_end) { if ((rom + bytes - 1) > rom_end) {
printk_warning("%6d:%s() - overflowed source buffer\n", printk_warning("%6d:%s() - overflowed source buffer\n",
__LINE__, __FUNCTION__); __LINE__, __FUNCTION__);
bytes = 0; bytes = 0;