diff options
author | Jörg Sommer <joerg@jo-so.de> | 2024-01-01 19:10:21 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2024-01-28 00:24:06 +0100 |
commit | fe276d3873c758ca17e06c31b3c05a3713cfe193 (patch) | |
tree | 0661612574e7470e5fe23ef4b509be74edc3822b | |
parent | 4929910267a00b8f9958d9e1710580e30d1d5a18 (diff) | |
download | zsh-fe276d3873c758ca17e06c31b3c05a3713cfe193.tar.gz zsh-fe276d3873c758ca17e06c31b3c05a3713cfe193.tar.xz zsh-fe276d3873c758ca17e06c31b3c05a3713cfe193.zip |
52442: mark hookdef.name as const
At least *zle_main* uses const strings to initialize its structure *zlehooks*.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Src/zsh.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 8cdd990d6..c85715ef3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2024-01-28 Oliver Kiddle <opk@zsh.org> + * Jörg Sommer: 52442: Src/zsh.h: Mark hookdef.name as const + * Jörg Sommer: 52444: Src/module.c: Mark name argument of some functions const diff --git a/Src/zsh.h b/Src/zsh.h index a0243e98e..fae62b8d0 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -1578,7 +1578,7 @@ typedef int (*Hookfn) _((Hookdef, void *)); struct hookdef { Hookdef next; - char *name; + const char *name; Hookfn def; int flags; LinkList funcs; |