summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-04 06:18:44 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-04 06:18:58 +0900
commit6bfe6020cc3a8f720cb326096649fbc74e7d5308 (patch)
tree3f859cfe63881117230664bff84fefaa8838e207
parente8d5ffd2ab58e7a20c8ca020d048eddc633d7c3c (diff)
theme: removed unnecessary null check.
Null check is already done in the previous line so do not check null again.
-rw-r--r--src/lib/elm_theme.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c
index bf77c3f8a..c35d37498 100644
--- a/src/lib/elm_theme.c
+++ b/src/lib/elm_theme.c
@@ -971,11 +971,10 @@ elm_theme_system_dir_get(void)
971 char buf[PATH_MAX]; 971 char buf[PATH_MAX];
972 972
973 if (path) return path; 973 if (path) return path;
974 if (!path) 974
975 { 975 snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir);
976 snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir); 976 path = strdup(buf);
977 path = strdup(buf); 977
978 }
979 return path; 978 return path;
980} 979}
981 980
@@ -986,13 +985,12 @@ elm_theme_user_dir_get(void)
986 char buf[PATH_MAX]; 985 char buf[PATH_MAX];
987 986
988 if (path) return path; 987 if (path) return path;
989 if (!path)
990 {
991 char *home = getenv("HOME");
992 if (!home) home = "";
993 988
994 snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home); 989 char *home = getenv("HOME");
995 path = strdup(buf); 990 if (!home) home = "";
996 } 991
992 snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home);
993 path = strdup(buf);
994
997 return path; 995 return path;
998} 996}