]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Consistently use for_each_image() to iterate over images
authorMichael Brown <mcb30@ipxe.org>
Mon, 6 Mar 2023 16:55:54 +0000 (16:55 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 6 Mar 2023 16:56:37 +0000 (16:56 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/image.c
src/interface/efi/efi_file.c

index f6d3d8ddd8e89573e67ccb2520cc303c6ae46456..5a9aebc7472442e56a62c4aa24631fb353f748f8 100644 (file)
@@ -312,7 +312,7 @@ void unregister_image ( struct image *image ) {
 struct image * find_image ( const char *name ) {
        struct image *image;
 
-       list_for_each_entry ( image, &images, list ) {
+       for_each_image ( image ) {
                if ( strcmp ( image->name, name ) == 0 )
                        return image;
        }
index 7bcf8d5971d3c7ffe59778a69758bf7403d620d8..f2b44fa7379b40d6acddea6d417d63727a8c0dcb 100644 (file)
@@ -130,7 +130,7 @@ static struct image * efi_file_find ( const char *name ) {
        struct image *image;
 
        /* Find image */
-       list_for_each_entry ( image, &images, list ) {
+       for_each_image ( image ) {
                if ( strcasecmp ( image->name, name ) == 0 )
                        return image;
        }