theme: removed unnecessary null check.

Null check is already done in the previous line so do not check null
again.
This commit is contained in:
Daniel Juyung Seo 2014-05-04 06:18:44 +09:00
parent 1c1cc3edd5
commit fcd1a729ed
1 changed files with 10 additions and 12 deletions

View File

@ -971,11 +971,10 @@ elm_theme_system_dir_get(void)
char buf[PATH_MAX];
if (path) return path;
if (!path)
{
snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir);
path = strdup(buf);
}
snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir);
path = strdup(buf);
return path;
}
@ -986,13 +985,12 @@ elm_theme_user_dir_get(void)
char buf[PATH_MAX];
if (path) return path;
if (!path)
{
char *home = getenv("HOME");
if (!home) home = "";
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home);
path = strdup(buf);
}
char *home = getenv("HOME");
if (!home) home = "";
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home);
path = strdup(buf);
return path;
}