]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
play.c: Replace NULL check by assertion. master
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 13 May 2024 21:32:52 +0000 (23:32 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 May 2024 16:12:45 +0000 (18:12 +0200)
If p is NULL, kma contains no colon, and we should not be here in the
first place. Instead, we should have errored out much earlier in the
command line parser.

Suggested-by: gcc(1)
filter_common.c
play.c
web/para.css

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);
index 2043fbb70b2afdf9ef243200920910bf564f2a1e..3a928c058a53aa4156d4fb4473b5d4d8f6cc0b3e 100644 (file)
@@ -2,6 +2,8 @@ body {
        font-family: sans-serif;
        background-color: black;
        color: #bbbbbb;
+       text-align: justify;
+       padding: 0px 40px 40px 40px;
        margin: 20px;
 }