diff options
| author | Oliver Kiddle <opk@zsh.org> | 2025-01-30 12:41:53 +0100 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2025-01-30 12:42:09 +0100 |
| commit | 86a0891952f8cd83138bc2b6fe760190c67c8ff9 (patch) | |
| tree | 8c3ff83942f5092a30b475c21a125b4950631fdd /Src/Zle/compctl.c | |
| parent | 53332, 53334: Avoid strlen calls after sprintf (diff) | |
| download | zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.gz zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.bz2 zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.lz zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.xz zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.zst zsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.zip | |
53335: Remove unused dupstring_glen() function
Also make use of the dupstring_wlen() variant in more places to avoid a strlen()
Diffstat (limited to 'Src/Zle/compctl.c')
| -rw-r--r-- | Src/Zle/compctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index 08355d1b9..de3ccdfce 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -3201,8 +3201,8 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) memcpy(lpre, s, lpl); lpre[lpl] = '\0'; qlpre = quotename(lpre); - lsuf = dupstring(s + offs); - lsl = strlen(lsuf); + lsl = strlen(s + offs); + lsuf = dupstring_wlen(s + offs, lsl); qlsuf = quotename(lsuf); /* First check for ~.../... */ |
