From ae6874d3088a46a3d02c64ec7e466baaf03a991f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 24 Jan 2014 23:19:46 +0000 Subject: Just ref a corestring. --- utils/nsurl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'utils') 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 #include +#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, -- cgit v1.2.3