Add constants for fast path resume copying
[coreboot.git] / src / lib / nrv2b.c
index e9d6ebf8b0b0af77f0002d86029314fc39151302..d84e99ec0be41c18c74ca2f066ccd019fa8fd862 100644 (file)
@@ -1,4 +1,4 @@
-// This GETBIT is supposed to work on little endian 
+// This GETBIT is supposed to work on little endian
 // 32bit systems. The algorithm will definitely need
 // some fixing on other systems, but it might not be
 // a problem since the nrv2b binary behaves the same..
@@ -28,7 +28,6 @@
 #if ENDIAN == 0 && BITSIZE == 32
 #define GETBIT(bb, src, ilen) GETBIT_LE32(bb, src, ilen)
 #endif
-
 static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
 {
        unsigned long ilen = 0, olen = 0, last_m_off = 1;
@@ -38,8 +37,8 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
 
        // skip length
        src += 4;
+       /* FIXME: check olen with the length stored in first 4 bytes */
 
-       /* FIXME: check olen with len on first 4 bytes */       
        for (;;) {
                unsigned int m_off, m_len;
                while (GETBIT(bb, src, ilen)) {