]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: add one more assertion
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Jun 2021 05:41:45 +0000 (14:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Jun 2021 05:42:03 +0000 (14:42 +0900)
src/shared/mount-util.c

index c4261b24944dade92424a37fc5934afec1baf44c..fa0d5cd8806974e10e41606a78ba0088ccb0365a 100644 (file)
@@ -564,6 +564,8 @@ static int mount_flags_to_string(long unsigned flags, char **ret) {
         };
         _cleanup_free_ char *str = NULL;
 
+        assert(ret);
+
         for (size_t i = 0; i < ELEMENTSOF(map); i++)
                 if (flags & map[i].flag) {
                         if (!strextend_with_separator(&str, "|", map[i].name))