From fcd1a729ed215010d774f1740af002bf53dedb16 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Sun, 4 May 2014 06:18:44 +0900 Subject: [PATCH] theme: removed unnecessary null check. Null check is already done in the previous line so do not check null again. --- legacy/elementary/src/lib/elm_theme.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/legacy/elementary/src/lib/elm_theme.c b/legacy/elementary/src/lib/elm_theme.c index bf77c3f8af..c35d374984 100644 --- a/legacy/elementary/src/lib/elm_theme.c +++ b/legacy/elementary/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; }