diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-24 23:19:46 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-24 23:19:46 +0000 |
commit | ae6874d3088a46a3d02c64ec7e466baaf03a991f (patch) | |
tree | 37043009bd0bde4e4671a318e58b4231a2dfbac1 /utils | |
parent | 5787f8335ea552e9011d989fc5d6473833bc1126 (diff) | |
download | netsurf-ae6874d3088a46a3d02c64ec7e466baaf03a991f.tar.gz netsurf-ae6874d3088a46a3d02c64ec7e466baaf03a991f.tar.bz2 |
Just ref a corestring.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/nsurl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/nsurl.c b/utils/nsurl.c index 61f849e5f..77cbc6d15 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <string.h> +#include "utils/corestrings.h" #include "utils/errors.h" #include "utils/log.h" #include "utils/nsurl.h" @@ -819,11 +820,8 @@ static nserror nsurl__create_from_section(const char * const url_s, switch (section) { case URL_SCHEME: if (length == 0) { - /* No scheme, assuming http, and add to URL */ - if (lwc_intern_string("http", SLEN("http"), - &url->scheme) != lwc_error_ok) { - return NSERROR_NOMEM; - } + /* No scheme, assuming http */ + url->scheme = lwc_string_ref(corestring_lwc_http); } else { /* Add scheme to URL */ if (lwc_intern_string(norm_start, length, |