Avoid a strlen.

svn path=/trunk/netsurf/; revision=13004
This commit is contained in:
Michael Drake 2011-10-08 12:22:29 +00:00
parent 642d773e2f
commit 265bfdd323
1 changed files with 1 additions and 1 deletions

View File

@ -1976,7 +1976,7 @@ void browser_window_refresh_url_bar(struct browser_window *bw, nsurl *url,
*/
gui_window_set_url(bw->window, nsurl_access(url));
} else {
url_buf = malloc(strlen(nsurl_access(url)) + 1 /* # */ +
url_buf = malloc(nsurl_length(url) + 1 /* # */ +
strlen(frag) + 1 /* \0 */);
if (url_buf != NULL) {
/* This sprintf is safe because of the above size