]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[test] Fix compiler warning on older gcc versions
authorMichael Brown <mcb30@ipxe.org>
Fri, 4 May 2012 17:46:26 +0000 (18:46 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 4 May 2012 17:46:26 +0000 (18:46 +0100)
Reported-by: Alex Davies <alex@davz.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/tests/list_test.c

index 39698553dc85c596c71d2c4a8c3db5324f0b2870..e237d56a8c9ae71964793939531450d17871a08b 100644 (file)
@@ -425,7 +425,7 @@ static void list_test_exec ( void ) {
        pos = &list_tests[7];
        list_iterate_entry_ok ( list_for_each_entry_continue, "293",
                                pos, list, list );
-       pos = list_entry ( list, struct list_test, list );
+       ok ( pos == list_entry ( list, struct list_test, list ) );
        list_iterate_entry_ok ( list_for_each_entry_continue, "47293",
                                pos, list, list );
        pos = &list_tests[3];
@@ -434,7 +434,7 @@ static void list_test_exec ( void ) {
        pos = &list_tests[2];
        list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "74",
                                pos, list, list );
-       pos = list_entry ( list, struct list_test, list );
+       ok ( pos == list_entry ( list, struct list_test, list ) );
        list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "39274",
                                pos, list, list );
        pos = &list_tests[4];