]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: add assert to guide static analysis
authorLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 11:47:18 +0000 (12:47 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 13:30:20 +0000 (14:30 +0100)
CID#1533112

src/dissect/dissect.c

index 10af26888e5bc2bca15205868a537252516bb196..ce4a99bc0bee8db700815978daffc1838fb5da0e 100644 (file)
@@ -1709,6 +1709,8 @@ static int action_detach(const char *path) {
         struct stat st;
         int r;
 
+        assert(path);
+
         fd = open(path, O_PATH|O_CLOEXEC);
         if (fd < 0)
                 return log_error_errno(errno, "Failed to open '%s': %m", path);