]> git.tue.mpg.de Git - dss.git/commitdiff
Silence a bogus scan-build warning.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 14 Nov 2017 02:14:47 +0000 (03:14 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 19 Nov 2017 01:53:33 +0000 (02:53 +0100)
We never pass a NULL pointer to create_snapshot(), but scan-build
is unable to prove this and claims that the array access results in
a  null pointer dereference. The added assertion helps the reader of
the code, and it quietens scan-build.

dss.c

diff --git a/dss.c b/dss.c
index a782a2e26b5562c0293e5b38d425be480610ba04..ffbf5004505559cb30d8c1deed25a0ab842a8121 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -1448,6 +1448,7 @@ static int create_snapshot(char **argv)
 {
        int ret;
 
+       assert(argv);
        ret = rename_resume_snap(current_snapshot_creation_time);
        if (ret < 0)
                return ret;