mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
Save a call to lwc_string_length.
This commit is contained in:
parent
4a59399cd7
commit
1228cd7576
@ -2080,10 +2080,9 @@ nserror nsurl_replace_query(const nsurl *url, const char *query,
|
||||
pos += query_len;
|
||||
if (url->components.fragment != NULL) {
|
||||
const char *frag = lwc_string_data(url->components.fragment);
|
||||
size_t frag_len = lwc_string_length(url->components.fragment);
|
||||
*pos = '#';
|
||||
memcpy(++pos, frag, frag_len);
|
||||
pos += frag_len;
|
||||
memcpy(++pos, frag, frag_len - 1);
|
||||
pos += frag_len - 1;
|
||||
}
|
||||
*pos = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user