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)
downloadelementary-6bfe6020cc3a8f720cb326096649fbc74e7d5308.tar.gz
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)
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;
}