]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portable: Remove unnecessary assert()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 18 May 2022 22:44:31 +0000 (00:44 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 May 2022 06:39:25 +0000 (15:39 +0900)
Fixes #23433

matches is plumbed through until it finally gets used in unit_match()
which can deal with NULL matches so the assert() is unnecessary and
can be removed.

The two call sites of extract_image_and_extensions() also don't
assert() on matches either.

src/portable/portable.c

index 7bba7b47e42a6d36a216d8c1c50705167e0f3d06..2191d6c65370bbdfe408c76001b4538da7de412c 100644 (file)
@@ -530,7 +530,6 @@ static int extract_image_and_extensions(
         int r;
 
         assert(name_or_path);
-        assert(matches);
 
         r = image_find_harder(IMAGE_PORTABLE, name_or_path, NULL, &image);
         if (r < 0)