]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[bzimage] Fix spurious uninitialised-variable warning on some gcc versions
authorMichael Brown <mcb30@ipxe.org>
Wed, 5 Jun 2013 14:54:42 +0000 (15:54 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 5 Jun 2013 14:56:23 +0000 (15:56 +0100)
Reported-by: Matthew Helton <mwhelton@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/image/bzimage.c

index 3b484b17409f1bb4c733138eace48be593a64b56..0618dbf4ed877777e3a0d2dbea7209480ceadefd 100644 (file)
@@ -386,6 +386,7 @@ static size_t bzimage_load_initrd ( struct image *image,
                offset = ( ( sizeof ( cpio ) + name_len + 0x03 ) & ~0x03 );
        } else {
                offset = 0;
+               name_len = 0;
        }
 
        /* Copy in initrd image body (and cpio header if applicable) */