]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Added a unit test to cover af_to_name in af-list.c
authorUnique-Usman <usmanakinyemi202@gmail.com>
Thu, 7 Mar 2024 14:47:44 +0000 (20:17 +0530)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 7 Mar 2024 22:57:38 +0000 (22:57 +0000)
src/test/test-af-list.c

index 45655d792ed44c917308ff716a70c9ac17c25986..8c86b72dc025c17d7e1df1719480eb23389e5c59 100644 (file)
@@ -22,6 +22,7 @@ TEST(af_list) {
         }
 
         assert_se(af_to_name(af_max()) == NULL);
+        assert_se(af_to_name(0) == NULL);
         assert_se(af_to_name(-1) == NULL);
         assert_se(af_from_name("huddlduddl") == -EINVAL);
         assert_se(af_from_name("") == -EINVAL);