From 04c1660f97af6caf089ff93d23dbb4af975572e0 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Jan 2022 15:50:29 +0100 Subject: [PATCH] [protocol] const name --- src/protocol/protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/protocol/protocol.c b/src/protocol/protocol.c index 97a231084..4d8caac51 100644 --- a/src/protocol/protocol.c +++ b/src/protocol/protocol.c @@ -47,7 +47,7 @@ struct protocol_backend { - char *name; + const char *name; int port; protocol_handler_T *handler; unsigned int need_slashes:1; @@ -115,7 +115,7 @@ get_protocol(char *name, int namelen) assert(start <= protocol && protocol <= end); while (start <= end) { - char *pname = protocol_backends[protocol].name; + const char *pname = protocol_backends[protocol].name; int pnamelen = strlen(pname); int minlen = int_min(pnamelen, namelen); int compare = c_strncasecmp(pname, name, minlen);