summaryrefslogtreecommitdiff
path: root/Src/string.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2025-01-30 12:41:53 +0100
committerOliver Kiddle <opk@zsh.org>2025-01-30 12:42:09 +0100
commit86a0891952f8cd83138bc2b6fe760190c67c8ff9 (patch)
tree8c3ff83942f5092a30b475c21a125b4950631fdd /Src/string.c
parentf7b5cc431bdda1f7123aca740bf7c535b98ca616 (diff)
downloadzsh-86a0891952f8cd83138bc2b6fe760190c67c8ff9.tar.gz
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/string.c')
-rw-r--r--Src/string.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/Src/string.c b/Src/string.c
index 5f439926e..0fa13ac0d 100644
--- a/Src/string.c
+++ b/Src/string.c
@@ -57,21 +57,6 @@ dupstring_wlen(const char *s, unsigned len)
return t;
}
-/* Duplicate string on heap, returning length of string */
-
-/**/
-mod_export char *
-dupstring_glen(const char *s, unsigned *len_ret)
-{
- char *t;
-
- if (!s)
- return NULL;
- t = (char *) zhalloc((*len_ret = strlen((char *)s)) + 1);
- strcpy(t, s);
- return t;
-}
-
/**/
mod_export char *
ztrdup(const char *s)