From 9b08752807ee94a6728f0f48441179364bb5ae8a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 25 Mar 2012 22:59:39 +0000 Subject: Ensure error is initialised svn path=/trunk/netsurf/; revision=13711 --- css/css.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'css') diff --git a/css/css.c b/css/css.c index 6d4fcdfb5..98760f560 100644 --- a/css/css.c +++ b/css/css.c @@ -943,11 +943,16 @@ nserror nscss_init(void) #define CSS_DOM_STRING_INTERN(NAME) \ - exc = dom_string_create_interned((const uint8_t *)#NAME, \ + do { \ + exc = dom_string_create_interned((const uint8_t *)#NAME,\ sizeof(#NAME) - 1, \ &nscss_dom_string_##NAME ); \ - if ((exc != DOM_NO_ERR) || (nscss_dom_string_##NAME == NULL)) \ - goto error + if ((exc != DOM_NO_ERR) || \ + (nscss_dom_string_##NAME == NULL)) { \ + error = NSERROR_NOMEM; \ + goto error; \ + } \ + } while(0) CSS_DOM_STRING_INTERN(a); CSS_DOM_STRING_INTERN(abscenter); -- cgit v1.2.3