mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 01:09:39 +03:00
Use tabs for indentation.
svn path=/trunk/netsurf/; revision=7008
This commit is contained in:
parent
1664683fa9
commit
08331f781e
@ -1099,29 +1099,29 @@ void browser_window_refresh_url_bar(struct browser_window *bw, const char *url,
|
||||
const char *frag)
|
||||
{
|
||||
char *url_buf;
|
||||
|
||||
assert(bw);
|
||||
assert(url);
|
||||
|
||||
if (frag == NULL) {
|
||||
/* With no fragment, we may as well pass url straight through
|
||||
* saving a malloc, copy, free cycle.
|
||||
*/
|
||||
gui_window_set_url(bw->window, url);
|
||||
} else {
|
||||
url_buf = malloc(strlen(url) + 1 /* # */ +
|
||||
strlen(frag) + 1 /* \0 */);
|
||||
if (url_buf != NULL) {
|
||||
/* This sprintf is safe because of the above size
|
||||
* calculation, thus we don't need snprintf
|
||||
*/
|
||||
sprintf(url_buf, "%s#%s", url, frag);
|
||||
gui_window_set_url(bw->window, url_buf);
|
||||
free(url_buf);
|
||||
} else {
|
||||
warn_user("NoMemory", 0);
|
||||
}
|
||||
}
|
||||
|
||||
assert(bw);
|
||||
assert(url);
|
||||
|
||||
if (frag == NULL) {
|
||||
/* With no fragment, we may as well pass url straight through
|
||||
* saving a malloc, copy, free cycle.
|
||||
*/
|
||||
gui_window_set_url(bw->window, url);
|
||||
} else {
|
||||
url_buf = malloc(strlen(url) + 1 /* # */ +
|
||||
strlen(frag) + 1 /* \0 */);
|
||||
if (url_buf != NULL) {
|
||||
/* This sprintf is safe because of the above size
|
||||
* calculation, thus we don't need snprintf
|
||||
*/
|
||||
sprintf(url_buf, "%s#%s", url, frag);
|
||||
gui_window_set_url(bw->window, url_buf);
|
||||
free(url_buf);
|
||||
} else {
|
||||
warn_user("NoMemory", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user