mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-26 16:29:36 +03:00
do not use strlen as a variable name
This commit is contained in:
parent
16cc1121e3
commit
2f663987c5
@ -121,7 +121,7 @@ get_login_description(struct nsurl *url,
|
|||||||
size_t url_l;
|
size_t url_l;
|
||||||
nserror res;
|
nserror res;
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
int strlen;
|
int slen;
|
||||||
const char *key;
|
const char *key;
|
||||||
|
|
||||||
res = nsurl_get(url, NSURL_SCHEME | NSURL_HOST, &url_s, &url_l);
|
res = nsurl_get(url, NSURL_SCHEME | NSURL_HOST, &url_s, &url_l);
|
||||||
@ -144,12 +144,12 @@ get_login_description(struct nsurl *url,
|
|||||||
} else {
|
} else {
|
||||||
/* no message so fallback */
|
/* no message so fallback */
|
||||||
const char *fmt = "The site %s is requesting your username and password. The realm is \"%s\"";
|
const char *fmt = "The site %s is requesting your username and password. The realm is \"%s\"";
|
||||||
strlen = snprintf(str, 0, fmt, url_s, realm) + 1;
|
slen = snprintf(str, 0, fmt, url_s, realm) + 1;
|
||||||
str = malloc(strlen);
|
str = malloc(slen);
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
res = NSERROR_NOMEM;
|
res = NSERROR_NOMEM;
|
||||||
} else {
|
} else {
|
||||||
snprintf(str, strlen, fmt, url_s, realm);
|
snprintf(str, slen, fmt, url_s, realm);
|
||||||
*out_str = str;
|
*out_str = str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user