Save a call to lwc_string_length.

This commit is contained in:
Michael Drake 2014-02-15 12:39:09 +00:00
parent 4a59399cd7
commit 1228cd7576

View File

@ -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';