From b696a5063e80aa68cb064a8ac0098edd31632555 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 28 Apr 2016 12:12:50 +0100 Subject: [PATCH] [image] Skip misleading "format not recognised" error message Return success (rather than failure) after an image format has been correctly identified. This has no practical effect, since the return value from image_probe() is deliberately never used, but avoids a somewhat surprising and misleading "format not recognised" error message when debugging is enabled. Signed-off-by: Michael Brown --- src/core/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/image.c b/src/core/image.c index 4a4e9c2a0..a185b82f4 100644 --- a/src/core/image.c +++ b/src/core/image.c @@ -191,7 +191,7 @@ static int image_probe ( struct image *image ) { image->type = type; DBGC ( image, "IMAGE %s is %s\n", image->name, type->name ); - break; + return 0; } DBGC ( image, "IMAGE %s is not %s: %s\n", image->name, type->name, strerror ( rc ) );