]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/device: fix meaningless assertion
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Apr 2025 00:29:40 +0000 (09:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Apr 2025 00:29:43 +0000 (09:29 +0900)
Closes CID#1609498.

src/core/device.c

index 08235caa42c5b393512e40e2f64065520416fa63..ea06f0ccb496b58d6f246003cfcdb1ad29bccf83 100644 (file)
@@ -364,7 +364,7 @@ static const struct {
 static int device_found_to_string_many(DeviceFound flags, char **ret) {
         _cleanup_free_ char *s = NULL;
 
-        assert(flags >= 0);
+        assert((flags & ~_DEVICE_FOUND_MASK) == 0);
         assert(ret);
 
         FOREACH_ELEMENT(i, device_found_map) {