text_setting: code refactoring.

err is enough to use.
This commit is contained in:
ChunEon Park 2015-07-10 20:10:37 +09:00
parent 2c4a407e65
commit c25eb038b3
1 changed files with 3 additions and 3 deletions

View File

@ -524,10 +524,10 @@ syntax_template_format_create(void)
}
char *utf8 = eina_file_map_all(file, EINA_FILE_POPULATE);
if (!utf8) goto syntax_template_format_create_err;
if (!utf8) goto err;
char *syntax_template_format = calloc(1, sizeof(char) * (strlen(utf8) + 1));
if (!syntax_template_format) goto syntax_template_format_create_err;
if (!syntax_template_format) goto err;
strcpy(syntax_template_format, utf8);
tsd->syntax_template_format = syntax_template_format;
@ -536,7 +536,7 @@ syntax_template_format_create(void)
return tsd->syntax_template_format;
syntax_template_format_create_err:
err:
EINA_LOG_ERR("Failed to allocate Memory!");
if (utf8) free(utf8);