]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'master' into next next
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 May 2024 16:14:48 +0000 (18:14 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 May 2024 16:14:48 +0000 (18:14 +0200)
* master:
  play.c: Replace NULL check by assertion.
  filter_common: Annotate possible NULL pointer confusion.

filter_common.c
play.c

index f48e457005ca3510fb51d5e5f95405af15d927c1..c1576752f6e4ddcbfd1b5357c3992df26a0c24ca 100644 (file)
@@ -99,6 +99,7 @@ int filter_setup(const char *fa, void **conf, struct lls_parse_result **lprp)
        if (ret < 0)
                goto free_argv;
        f = filter_get(filter_num);
+       assert(f);
        *conf = f->setup? f->setup(*lprp) : NULL;
        ret = filter_num;
 free_argv:
diff --git a/play.c b/play.c
index bd183b6b8dd48906e08cf142d7ff8c1e05aad48a..4adedcc0475a6a810513989499ab31b752d2a945 100644 (file)
--- a/play.c
+++ b/play.c
@@ -580,8 +580,7 @@ static char *get_user_key_map_seq(int key)
        char *result;
        int len;
 
-       if (!p)
-               return NULL;
+       assert(p);
        len = p - kma;
        result = alloc(len + 1);
        memcpy(result, kma, len);