diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 14:41:20 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 15:15:30 +0100 |
| commit | b668e52c906b664b353d5a99cfa3ff36f73b341d (patch) | |
| tree | 85ab744c5dd15c21633b89a518ff001225c98494 /libbb/replace.c | |
| parent | 9e8f8a196838b63acdbd2c9b48a2a333bc885e8b (diff) | |
| download | busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.gz busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.bz2 busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.zip | |
*: placate warnings where strchr/strstr returns constant pointer
Newer glibc is now smarter and can propagate const-ness from those!
function old new delta
readtoken1 3111 3108 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/replace.c')
| -rw-r--r-- | libbb/replace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/replace.c b/libbb/replace.c index bc26b04cc..273330f8a 100644 --- a/libbb/replace.c +++ b/libbb/replace.c | |||
| @@ -28,7 +28,8 @@ unsigned FAST_FUNC count_strstr(const char *str, const char *sub) | |||
| 28 | 28 | ||
| 29 | char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char *sub, const char *repl) | 29 | char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char *sub, const char *repl) |
| 30 | { | 30 | { |
| 31 | char *buf, *dst, *end; | 31 | char *buf, *dst; |
| 32 | const char *end; | ||
| 32 | size_t sub_len = strlen(sub); | 33 | size_t sub_len = strlen(sub); |
| 33 | size_t repl_len = strlen(repl); | 34 | size_t repl_len = strlen(repl); |
| 34 | 35 | ||
