commit eab8dcd9ac351a8219af071d1f3280ba4767a85b
parent f34d21caa7337466c96fd7e1920bdd57b26ef7a4
Author: Joris Vink <joris@coders.se>
Date: Wed, 19 Oct 2022 07:34:14 +0200
Constify in parameter for kore_strip_chars()
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/kore/kore.h b/include/kore/kore.h
@@ -937,7 +937,7 @@ u_int64_t kore_strtonum64(const char *, int, int *);
size_t kore_strlcpy(char *, const char *, const size_t);
void kore_server_disconnect(struct connection *);
int kore_split_string(char *, const char *, char **, size_t);
-void kore_strip_chars(char *, const char, char **);
+void kore_strip_chars(const char *, const char, char **);
int kore_snprintf(char *, size_t, int *, const char *, ...)
__attribute__((format (printf, 4, 5)));
long long kore_strtonum(const char *, int, long long, long long, int *);
diff --git a/src/utils.c b/src/utils.c
@@ -239,10 +239,11 @@ kore_split_string(char *input, const char *delim, char **out, size_t ele)
}
void
-kore_strip_chars(char *in, const char strip, char **out)
+kore_strip_chars(const char *in, const char strip, char **out)
{
+ char *p;
+ const char *s;
u_int32_t len;
- char *s, *p;
len = strlen(in);
*out = kore_malloc(len + 1);