Author: stepan
Date: 2007-02-03 11:43:48 +0100 (Sat, 03 Feb 2007)
New Revision: 2547

Modified:
   trunk/LinuxBIOSv2/src/stream/rom_stream.c
Log:
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 <[EMAIL PROTECTED]>
Acked-by: Stefan Reinauer <[EMAIL PROTECTED]>



Modified: trunk/LinuxBIOSv2/src/stream/rom_stream.c
===================================================================
--- trunk/LinuxBIOSv2/src/stream/rom_stream.c   2007-02-02 22:40:10 UTC (rev 
2546)
+++ trunk/LinuxBIOSv2/src/stream/rom_stream.c   2007-02-03 10:43:48 UTC (rev 
2547)
@@ -116,7 +116,7 @@
 {
        byte_offset_t bytes;
        bytes = count;
-       if ((rom + bytes) > rom_end) {
+       if ((rom + bytes - 1) > rom_end) {
                printk_warning("%6d:%s() - overflowed source buffer\n",
                        __LINE__, __FUNCTION__);
                bytes = 0;


-- 
linuxbios mailing list
[email protected]
http://www.openbios.org/mailman/listinfo/linuxbios

Reply via email to