mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[protocol] const name
This commit is contained in:
parent
e44f1f6490
commit
04c1660f97
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
|
|
||||||
struct protocol_backend {
|
struct protocol_backend {
|
||||||
char *name;
|
const char *name;
|
||||||
int port;
|
int port;
|
||||||
protocol_handler_T *handler;
|
protocol_handler_T *handler;
|
||||||
unsigned int need_slashes:1;
|
unsigned int need_slashes:1;
|
||||||
@ -115,7 +115,7 @@ get_protocol(char *name, int namelen)
|
|||||||
assert(start <= protocol && protocol <= end);
|
assert(start <= protocol && protocol <= end);
|
||||||
|
|
||||||
while (start <= end) {
|
while (start <= end) {
|
||||||
char *pname = protocol_backends[protocol].name;
|
const char *pname = protocol_backends[protocol].name;
|
||||||
int pnamelen = strlen(pname);
|
int pnamelen = strlen(pname);
|
||||||
int minlen = int_min(pnamelen, namelen);
|
int minlen = int_min(pnamelen, namelen);
|
||||||
int compare = c_strncasecmp(pname, name, minlen);
|
int compare = c_strncasecmp(pname, name, minlen);
|
||||||
|
Loading…
Reference in New Issue
Block a user