image: Prevent an uninitialized variable warning

padlen variable in image_write() cannot be used uninitialized,
but compiler is unable to determine that.

Signed-off-by: Maxim Kammerer <mk@dee.su>
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
Maxim Kammerer 2012-08-04 05:09:10 +04:00 committed by Jeremy Kerr
parent 591847bb79
commit 1c8fac1fbe

View file

@ -395,6 +395,7 @@ int image_write(struct image *image, const char *filename)
uint8_t pad[8];
is_signed = image->sigbuf && image->sigsize;
padlen = 0;
/* optionally update the image to contain signature data */
if (is_signed) {