mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
use sizeof instead of strlen for two constant strings
This commit is contained in:
parent
516cee7706
commit
ae38be0fe0
@ -1054,7 +1054,7 @@ subst_file(unsigned char *prog, unsigned char *file, unsigned char *uri)
|
||||
replace = file;
|
||||
else if (*prog == 'u') {
|
||||
replace = uri;
|
||||
if (! memcmp(uri, "data:", strlen("data:")))
|
||||
if (!memcmp(uri, "data:", sizeof("data:") - 1))
|
||||
truncate = 1;
|
||||
}
|
||||
else if (*prog == '%')
|
||||
@ -1083,7 +1083,8 @@ subst_file(unsigned char *prog, unsigned char *file, unsigned char *uri)
|
||||
strlen(replace));
|
||||
else {
|
||||
add_shell_quoted_to_string(&name, replace, 40);
|
||||
add_shell_quoted_to_string(&name, "...", 3);
|
||||
add_shell_quoted_to_string(&name,
|
||||
"...", sizeof("...") - 1);
|
||||
}
|
||||
#endif
|
||||
prog++;
|
||||
|
Loading…
Reference in New Issue
Block a user