Re: [PATCH 1/2] test-isodetect: replace while loop with for loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 17, 2018 at 8:08 PM Věra Cholasta <vbudikov@xxxxxxxxxx> wrote:
>
> ---
>  tests/test-isodetect.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/tests/test-isodetect.c b/tests/test-isodetect.c
> index 76f0c5a..c1833ae 100644
> --- a/tests/test-isodetect.c
> +++ b/tests/test-isodetect.c
> @@ -390,8 +390,7 @@ static void test_one(const gchar *vendor)
>
>      g_assert_nonnull(isos);
>
> -    tmp = isos;
> -    while (tmp) {
> +    for (tmp = isos; tmp; tmp = tmp->next) {
>          struct ISOInfo *info  = tmp->data;
>          gboolean matched = osinfo_db_identify_media(db, info->media);
>          OsinfoOs *os;
> @@ -408,8 +407,6 @@ static void test_one(const gchar *vendor)
>          g_assert_cmpstr(shortid, ==, info->shortid);
>          g_object_unref(G_OBJECT(os));
>          test_langs(info);
> -
> -        tmp = tmp->next;
>      }
>
>      g_list_foreach(isos, (GFunc)free_iso, NULL);
> --
> 1.8.3.1
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libosinfo

Reviewed-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux